mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 19:27:26 +08:00
Debounce user-requested replay seeks
This commit is contained in:
parent
e5149b4be9
commit
f0bcb2b933
@ -9,6 +9,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Framework.Threading;
|
||||
|
||||
namespace osu.Game.Screens.Play
|
||||
{
|
||||
@ -121,6 +122,12 @@ namespace osu.Game.Screens.Play
|
||||
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…
Reference in New Issue
Block a user