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

Merge pull request #5983 from peppy/handle-click-event

HoverClickSounds should handle click event instead of MouseUp
This commit is contained in:
Dan Balasescu 2019-09-04 12:55:10 +09:00 committed by GitHub
commit 0875ec75a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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]