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