1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 19:22:54 +08:00

Stop hover sounds from playing when dragging (scrolling)

This commit is contained in:
Dean Herbert 2021-02-12 12:20:39 +09:00
parent cd01591dda
commit a2035a2e84

View File

@ -30,6 +30,10 @@ namespace osu.Game.Graphics.UserInterface
protected override bool OnHover(HoverEvent e)
{
// hover sounds shouldn't be played during scroll operations.
if (e.HasAnyButtonPressed)
return false;
bool enoughTimePassedSinceLastPlayback = !lastPlaybackTime.Value.HasValue || Time.Current - lastPlaybackTime.Value >= HoverDebounceTime;
if (enoughTimePassedSinceLastPlayback)