Move DummyWorkingBeatmap to a more global level (OsuScreen)

This commit is contained in:
Dean Herbert 2017-07-18 17:44:45 +09:00
parent 6016310b09
commit 21984ba764
3 changed files with 3 additions and 5 deletions

View File

@ -20,6 +20,7 @@ namespace osu.Game.Beatmaps
Title = "no beatmaps available!", Title = "no beatmaps available!",
Author = "no one", Author = "no one",
}, },
BeatmapSet = new BeatmapSetInfo(),
Difficulty = new BeatmapDifficulty(), Difficulty = new BeatmapDifficulty(),
}) })
{ {
@ -32,6 +33,6 @@ namespace osu.Game.Beatmaps
protected override Texture GetBackground() => null; protected override Texture GetBackground() => null;
protected override Track GetTrack() => null; protected override Track GetTrack() => new TrackVirtual();
} }
} }

View File

@ -49,7 +49,7 @@ namespace osu.Game.Screens
} }
set set
{ {
beatmap.Value = value; beatmap.Value = value ?? new DummyWorkingBeatmap();
} }
} }

View File

@ -71,9 +71,6 @@ namespace osu.Game.Screens.Select
public void UpdateBeatmap(WorkingBeatmap beatmap) public void UpdateBeatmap(WorkingBeatmap beatmap)
{ {
if (beatmap == null)
beatmap = new DummyWorkingBeatmap();
var lastContainer = beatmapInfoContainer; var lastContainer = beatmapInfoContainer;
float newDepth = lastContainer?.Depth + 1 ?? 0; float newDepth = lastContainer?.Depth + 1 ?? 0;