mirror of https://github.com/ppy/osu
Show an empty baetmap instead of nothing
This commit is contained in:
parent
0adfe5f348
commit
266c7b28e8
|
@ -12,6 +12,7 @@
|
||||||
using osu.Game.Beatmaps.Legacy;
|
using osu.Game.Beatmaps.Legacy;
|
||||||
using osu.Game.Extensions;
|
using osu.Game.Extensions;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Models;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Screens.Menu;
|
using osu.Game.Screens.Menu;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
@ -101,11 +102,25 @@ private void load(OsuColour colours)
|
||||||
|
|
||||||
private void refreshContent()
|
private void refreshContent()
|
||||||
{
|
{
|
||||||
if (beatmap == null)
|
beatmap ??= new BeatmapInfo
|
||||||
{
|
{
|
||||||
flow.Clear();
|
Metadata = new BeatmapMetadata
|
||||||
return;
|
{
|
||||||
}
|
Artist = "unknown",
|
||||||
|
Title = "no beatmap selected",
|
||||||
|
Author = new RealmUser { Username = "unknown" },
|
||||||
|
},
|
||||||
|
DifficultyName = "unknown",
|
||||||
|
BeatmapSet = new BeatmapSetInfo(),
|
||||||
|
StarRating = 0,
|
||||||
|
Difficulty = new BeatmapDifficulty
|
||||||
|
{
|
||||||
|
CircleSize = 0,
|
||||||
|
DrainRate = 0,
|
||||||
|
OverallDifficulty = 0,
|
||||||
|
ApproachRate = 0,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
double bpm = beatmap.BPM;
|
double bpm = beatmap.BPM;
|
||||||
double length = beatmap.Length;
|
double length = beatmap.Length;
|
||||||
|
|
Loading…
Reference in New Issue