mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 11:23:00 +08:00
Fall back to default background
This commit is contained in:
parent
7c53c7b602
commit
fc62877fdc
@ -30,10 +30,15 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
{
|
||||
return new DelayedLoadUnloadWrapper(() =>
|
||||
{
|
||||
if (model?.BeatmapSet?.OnlineInfo == null)
|
||||
return null;
|
||||
Drawable drawable;
|
||||
|
||||
Drawable drawable = new BeatmapSetCover(model.BeatmapSet, beatmapSetCoverType);
|
||||
if (model?.BeatmapSet?.OnlineInfo != null)
|
||||
drawable = new BeatmapSetCover(model.BeatmapSet, beatmapSetCoverType);
|
||||
else
|
||||
{
|
||||
// Use the default background if somehow an online set does not exist.
|
||||
drawable = new BeatmapBackgroundSprite(beatmaps.GetWorkingBeatmap(null));
|
||||
}
|
||||
|
||||
drawable.RelativeSizeAxes = Axes.Both;
|
||||
drawable.Anchor = Anchor.Centre;
|
||||
|
Loading…
Reference in New Issue
Block a user