mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 09:58:21 +08:00
Merge pull request #5983 from peppy/handle-click-event
HoverClickSounds should handle click event instead of MouseUp
This commit is contained in:
commit
0875ec75a7
@ -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