Merge pull request #3566 from smoogipoo/debounce-seeks

Debounce music controller seeks
This commit is contained in:
Dean Herbert 2018-10-12 18:01:22 +09:00 committed by GitHub
commit 079c4457f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)