mirror of
https://github.com/ppy/osu.git
synced 2026-05-27 03:39:53 +08:00
Move to next track on Completed event
This commit is contained in:
@@ -253,9 +253,6 @@ namespace osu.Game.Overlays
|
||||
progressBar.CurrentTime = track.CurrentTime;
|
||||
|
||||
playButton.Icon = track.IsRunning ? FontAwesome.fa_pause_circle_o : FontAwesome.fa_play_circle_o;
|
||||
|
||||
if (track.HasCompleted && !track.Looping && !beatmap.Disabled && beatmapSets.Any())
|
||||
next();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -333,9 +330,13 @@ namespace osu.Game.Overlays
|
||||
|
||||
direction = last > next ? TransformDirection.Prev : TransformDirection.Next;
|
||||
}
|
||||
|
||||
current.Track.Completed -= currentTrackCompleted;
|
||||
}
|
||||
|
||||
current = beatmap;
|
||||
if (current != null)
|
||||
current.Track.Completed += currentTrackCompleted;
|
||||
|
||||
progressBar.CurrentTime = 0;
|
||||
|
||||
@@ -344,6 +345,12 @@ namespace osu.Game.Overlays
|
||||
queuedDirection = null;
|
||||
}
|
||||
|
||||
private void currentTrackCompleted()
|
||||
{
|
||||
if (!beatmap.Disabled && beatmapSets.Any())
|
||||
next();
|
||||
}
|
||||
|
||||
private ScheduledDelegate pendingBeatmapSwitch;
|
||||
|
||||
private void updateDisplay(WorkingBeatmap beatmap, TransformDirection direction)
|
||||
|
||||
Reference in New Issue
Block a user