Handle hover blocking in VolumeOverlay to ensure correct hide scheduling

This commit is contained in:
Dean Herbert
2018-06-13 16:46:48 +09:00
parent 2a18625b2c
commit a55bf82fd9
2 changed files with 8 additions and 3 deletions

View File

@ -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)

View File

@ -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);
} }