mirror of
https://github.com/ppy/osu.git
synced 2025-03-15 14:47:18 +08:00
Debounce music controller seeks
This commit is contained in:
parent
3322eb47b3
commit
ccb6723711
@ -196,10 +196,16 @@ namespace osu.Game.Overlays
|
||||
playlist.StateChanged += s => playlistButton.FadeColour(s == Visibility.Visible ? colours.Yellow : Color4.White, 200, Easing.OutQuint);
|
||||
}
|
||||
|
||||
private ScheduledDelegate seekDelegate;
|
||||
|
||||
private void attemptSeek(double progress)
|
||||
{
|
||||
if (!beatmap.Disabled)
|
||||
current?.Track.Seek(progress);
|
||||
seekDelegate?.Cancel();
|
||||
seekDelegate = Schedule(() =>
|
||||
{
|
||||
if (!beatmap.Disabled)
|
||||
current?.Track.Seek(progress);
|
||||
});
|
||||
}
|
||||
|
||||
private void playlistOrderChanged(BeatmapSetInfo beatmapSetInfo, int index)
|
||||
|
Loading…
x
Reference in New Issue
Block a user