mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 04:13:00 +08:00
Remove unnecessary (and broken) requiresDebounce check
This commit is contained in:
parent
11801d61c1
commit
e156bcdcae
@ -47,10 +47,9 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
protected override bool OnHover(HoverEvent e)
|
protected override bool OnHover(HoverEvent e)
|
||||||
{
|
{
|
||||||
bool requiresDebounce = HoverDebounceTime <= 0;
|
|
||||||
bool enoughTimePassedSinceLastPlayback = !lastPlaybackTime.Value.HasValue || Time.Current - lastPlaybackTime.Value >= HoverDebounceTime;
|
bool enoughTimePassedSinceLastPlayback = !lastPlaybackTime.Value.HasValue || Time.Current - lastPlaybackTime.Value >= HoverDebounceTime;
|
||||||
|
|
||||||
if (!requiresDebounce || enoughTimePassedSinceLastPlayback)
|
if (enoughTimePassedSinceLastPlayback)
|
||||||
{
|
{
|
||||||
sampleHover?.Play();
|
sampleHover?.Play();
|
||||||
lastPlaybackTime.Value = Time.Current;
|
lastPlaybackTime.Value = Time.Current;
|
||||||
|
Loading…
Reference in New Issue
Block a user