mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 09:02:58 +08:00
Fix osu! logo making hover beat sounds when not visible
This commit is contained in:
parent
3151940435
commit
e0b74a357a
@ -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)
|
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||||
{
|
{
|
||||||
if (!interactive) return false;
|
|
||||||
|
|
||||||
logoBounceContainer.ScaleTo(0.9f, 1000, Easing.Out);
|
logoBounceContainer.ScaleTo(0.9f, 1000, Easing.Out);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -355,8 +353,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
protected override bool OnClick(InputState state)
|
protected override bool OnClick(InputState state)
|
||||||
{
|
{
|
||||||
if (!interactive) return false;
|
|
||||||
|
|
||||||
if (Action?.Invoke() ?? true)
|
if (Action?.Invoke() ?? true)
|
||||||
sampleClick.Play();
|
sampleClick.Play();
|
||||||
|
|
||||||
@ -368,8 +364,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
protected override bool OnHover(InputState state)
|
protected override bool OnHover(InputState state)
|
||||||
{
|
{
|
||||||
if (!interactive) return false;
|
|
||||||
|
|
||||||
logoHoverContainer.ScaleTo(1.1f, 500, Easing.OutElastic);
|
logoHoverContainer.ScaleTo(1.1f, 500, Easing.OutElastic);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user