mirror of
https://github.com/osukey/osukey.git
synced 2025-06-09 21:37:59 +09: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)
|
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;
|
bool enoughTimePassedSinceLastPlayback = !lastPlaybackTime.Value.HasValue || Time.Current - lastPlaybackTime.Value >= HoverDebounceTime;
|
||||||
|
|
||||||
if (enoughTimePassedSinceLastPlayback)
|
if (enoughTimePassedSinceLastPlayback)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user