mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 17:37:23 +09:00
Debounce user-requested replay seeks (#6138)
Debounce user-requested replay seeks
This commit is contained in:
commit
7af194e5ed
@ -9,6 +9,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Framework.MathUtils;
|
using osu.Framework.MathUtils;
|
||||||
|
using osu.Framework.Threading;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play
|
namespace osu.Game.Screens.Play
|
||||||
{
|
{
|
||||||
@ -121,6 +122,12 @@ namespace osu.Game.Screens.Play
|
|||||||
handleBase.X = newX;
|
handleBase.X = newX;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnUserChange(double value) => OnSeek?.Invoke(value);
|
private ScheduledDelegate scheduledSeek;
|
||||||
|
|
||||||
|
protected override void OnUserChange(double value)
|
||||||
|
{
|
||||||
|
scheduledSeek?.Cancel();
|
||||||
|
scheduledSeek = Schedule(() => OnSeek?.Invoke(value));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user