1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-27 04:19:54 +08:00

Move to next track on Completed event

This commit is contained in:
Roman Kapustin
2018-11-17 15:39:40 +03:00
Unverified
parent befe57e12e
commit c4fc87b69a
+10 -3
View File
@@ -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)