mirror of
https://github.com/osukey/osukey.git
synced 2025-05-03 20:57:28 +09:00
Move to next track on Completed event
This commit is contained in:
parent
befe57e12e
commit
c4fc87b69a
@ -253,9 +253,6 @@ namespace osu.Game.Overlays
|
|||||||
progressBar.CurrentTime = track.CurrentTime;
|
progressBar.CurrentTime = track.CurrentTime;
|
||||||
|
|
||||||
playButton.Icon = track.IsRunning ? FontAwesome.fa_pause_circle_o : FontAwesome.fa_play_circle_o;
|
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
|
else
|
||||||
{
|
{
|
||||||
@ -333,9 +330,13 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
direction = last > next ? TransformDirection.Prev : TransformDirection.Next;
|
direction = last > next ? TransformDirection.Prev : TransformDirection.Next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
current.Track.Completed -= currentTrackCompleted;
|
||||||
}
|
}
|
||||||
|
|
||||||
current = beatmap;
|
current = beatmap;
|
||||||
|
if (current != null)
|
||||||
|
current.Track.Completed += currentTrackCompleted;
|
||||||
|
|
||||||
progressBar.CurrentTime = 0;
|
progressBar.CurrentTime = 0;
|
||||||
|
|
||||||
@ -344,6 +345,12 @@ namespace osu.Game.Overlays
|
|||||||
queuedDirection = null;
|
queuedDirection = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void currentTrackCompleted()
|
||||||
|
{
|
||||||
|
if (!beatmap.Disabled && beatmapSets.Any())
|
||||||
|
next();
|
||||||
|
}
|
||||||
|
|
||||||
private ScheduledDelegate pendingBeatmapSwitch;
|
private ScheduledDelegate pendingBeatmapSwitch;
|
||||||
|
|
||||||
private void updateDisplay(WorkingBeatmap beatmap, TransformDirection direction)
|
private void updateDisplay(WorkingBeatmap beatmap, TransformDirection direction)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user