mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 23:52:57 +08:00
HoverClickSounds should handle click event instead of MouseUp
This commit is contained in:
parent
8d52d282e9
commit
4c563232d6
@ -34,12 +34,12 @@ namespace osu.Game.Graphics.UserInterface
|
||||
this.buttons = buttons ?? new[] { MouseButton.Left };
|
||||
}
|
||||
|
||||
protected override bool OnMouseUp(MouseUpEvent e)
|
||||
protected override bool OnClick(ClickEvent e)
|
||||
{
|
||||
if (buttons.Contains(e.Button) && Contains(e.ScreenSpaceMousePosition))
|
||||
sampleClick?.Play();
|
||||
|
||||
return base.OnMouseUp(e);
|
||||
return base.OnClick(e);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
|
Loading…
Reference in New Issue
Block a user