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:
commit
d0c7138313
@ -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;
|
||||
|
@ -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 } }
|
||||
}
|
||||
};
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user