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:
parent
cd01591dda
commit
a2035a2e84
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user