1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 07:32:55 +08:00

Merge pull request #2272 from peppy/fix-osu-logo-sounds

Fix osu! logo making hover beat sounds when not visible
This commit is contained in:
Dean Herbert 2018-03-22 13:46:46 +09:00 committed by GitHub
commit 42c1cb4bab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -337,12 +337,10 @@ namespace osu.Game.Screens.Menu
}
}
private bool interactive => Action != null && Alpha > 0.2f;
public override bool HandleMouseInput => base.HandleMouseInput && Action != null && Alpha > 0.2f;
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
{
if (!interactive) return false;
logoBounceContainer.ScaleTo(0.9f, 1000, Easing.Out);
return true;
}
@ -355,8 +353,6 @@ namespace osu.Game.Screens.Menu
protected override bool OnClick(InputState state)
{
if (!interactive) return false;
if (Action?.Invoke() ?? true)
sampleClick.Play();
@ -368,8 +364,6 @@ namespace osu.Game.Screens.Menu
protected override bool OnHover(InputState state)
{
if (!interactive) return false;
logoHoverContainer.ScaleTo(1.1f, 500, Easing.OutElastic);
return true;
}