1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-14 05:47:20 +08:00

Merge pull request #21829 from integerrr/replay-menu-expanded-state-memory

Make replay controls menus expand on hover
This commit is contained in:
Dean Herbert 2023-01-17 15:24:01 +09:00 committed by GitHub
commit d0c7138313
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -135,12 +135,14 @@ namespace osu.Game.Overlays
protected override bool OnHover(HoverEvent e)
{
updateFadeState();
updateExpandedState(true);
return false;
}
protected override void OnHoverLost(HoverLostEvent e)
{
updateFadeState();
updateExpandedState(true);
base.OnHoverLost(e);
}
@ -168,7 +170,7 @@ namespace osu.Game.Overlays
// potentially continuing to get processed while content has changed to autosize.
content.ClearTransforms();
if (Expanded.Value)
if (Expanded.Value || IsHovered)
{
content.AutoSizeAxes = Axes.Y;
content.AutoSizeDuration = animate ? transition_duration : 0;

View File

@ -41,7 +41,7 @@ namespace osu.Game.Screens.Play.HUD
{
//CollectionSettings = new CollectionSettings(),
//DiscussionSettings = new DiscussionSettings(),
PlaybackSettings = new PlaybackSettings(),
PlaybackSettings = new PlaybackSettings { Expanded = { Value = false } },
VisualSettings = new VisualSettings { Expanded = { Value = false } }
}
};

View File

@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using osu.Framework.Input.Events;
using osu.Game.Overlays;