mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Comments, play first song if current is nil and user presses play
This commit is contained in:
@ -108,10 +108,10 @@ namespace osu.Game.Overlays
|
||||
OnSelect = (set, index) =>
|
||||
{
|
||||
if (set.ID == (current?.BeatmapSetInfo?.ID ?? -1))
|
||||
current?.Track?.Seek(0);
|
||||
current?.Track?.Seek(0);
|
||||
|
||||
play(set.Beatmaps[0], true);
|
||||
playListIndex = index;
|
||||
play(set.Beatmaps[0], true);
|
||||
},
|
||||
},
|
||||
playerContainer = new Container
|
||||
@ -177,7 +177,13 @@ namespace osu.Game.Overlays
|
||||
IconScale = new Vector2(1.4f),
|
||||
Action = () =>
|
||||
{
|
||||
if (current?.Track == null) return;
|
||||
if (current?.Track == null)
|
||||
{
|
||||
if (playList.Count > 0)
|
||||
play(playList.First().Beatmaps[0], true);
|
||||
else
|
||||
return;
|
||||
}
|
||||
if (current.Track.IsRunning)
|
||||
current.Track.Stop();
|
||||
else
|
||||
@ -286,9 +292,9 @@ namespace osu.Game.Overlays
|
||||
if (current != null && playList.Count == 1) return;
|
||||
|
||||
int n = playListIndex + 1;
|
||||
if (n >= playList.Count)
|
||||
if (n >= playList.Count)
|
||||
n = 0;
|
||||
|
||||
|
||||
play(playList[n].Beatmaps[0], true);
|
||||
playListIndex = n;
|
||||
}
|
||||
|
Reference in New Issue
Block a user