mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 01:53:01 +08:00
Handle hover blocking in VolumeOverlay to ensure correct hide scheduling
This commit is contained in:
parent
2a18625b2c
commit
a55bf82fd9
@ -221,7 +221,7 @@ namespace osu.Game.Overlays.Volume
|
||||
protected override bool OnHover(InputState state)
|
||||
{
|
||||
this.ScaleTo(1.04f, transition_length, Easing.OutExpo);
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
protected override void OnHoverLost(InputState state)
|
||||
|
@ -142,13 +142,18 @@ namespace osu.Game.Overlays
|
||||
return base.OnMouseMove(state);
|
||||
}
|
||||
|
||||
protected override bool OnHover(InputState state)
|
||||
{
|
||||
Show();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void schedulePopOut()
|
||||
{
|
||||
popOutDelegate?.Cancel();
|
||||
this.Delay(1000).Schedule(() =>
|
||||
{
|
||||
// only actually hide if the mouse isn't within our bounds.
|
||||
if (!ScreenSpaceDrawQuad.Contains(GetContainingInputManager().CurrentState.Mouse.Position))
|
||||
if (!IsHovered)
|
||||
Hide();
|
||||
}, out popOutDelegate);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user