mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 14:17:26 +08:00
Fix to work individually.
This commit is contained in:
parent
aa107de162
commit
36cefcb956
@ -29,6 +29,7 @@ namespace osu.Game.Overlays
|
||||
private SpriteText title, artist;
|
||||
|
||||
private OsuGameBase osuGame;
|
||||
private TrackManager trackManager;
|
||||
private List<BeatmapSetInfo> playList;
|
||||
private BeatmapDatabase database;
|
||||
private Bindable<WorkingBeatmap> beatmapSource;
|
||||
@ -47,7 +48,8 @@ namespace osu.Game.Overlays
|
||||
beatmapSource = osuGame.Beatmap ?? new Bindable<WorkingBeatmap>();
|
||||
current = beatmapSource.Value;
|
||||
if (database == null) database = osuGame.Beatmaps;
|
||||
playList = database.Query<BeatmapSetInfo>().ToList();
|
||||
trackManager = osuGame.Audio.Track;
|
||||
playList = database.GetAllWithChildren<BeatmapSetInfo>();
|
||||
|
||||
Width = 400;
|
||||
Height = 130;
|
||||
@ -229,6 +231,8 @@ namespace osu.Game.Overlays
|
||||
private void play(BeatmapInfo info, bool? isNext)
|
||||
{
|
||||
current = database.GetWorkingBeatmap(info, current);
|
||||
trackManager.SetExclusive(current.Track);
|
||||
current.Track.Start();
|
||||
beatmapSource.Value = current;
|
||||
updateCurrent(current, isNext);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user