1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:47:29 +08:00

HoverClickSounds should handle click event instead of MouseUp

This commit is contained in:
Dean Herbert 2019-09-04 11:37:02 +09:00
parent 8d52d282e9
commit 4c563232d6

View File

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