mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Fall back to default background
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user