mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 11:42:56 +08:00
Remove local background logic
This commit is contained in:
parent
aecbc31ffa
commit
7c53c7b602
@ -9,7 +9,7 @@ using osu.Framework.Graphics.Containers;
|
||||
namespace osu.Game.Beatmaps.Drawables
|
||||
{
|
||||
/// <summary>
|
||||
/// Display a baetmap background from a local source, but fallback to online source if not available.
|
||||
/// Display a beatmap background from an online source
|
||||
/// </summary>
|
||||
public class UpdateableBeatmapBackgroundSprite : ModelBackedDrawable<BeatmapInfo>
|
||||
{
|
||||
@ -30,14 +30,10 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
{
|
||||
return new DelayedLoadUnloadWrapper(() =>
|
||||
{
|
||||
Drawable drawable;
|
||||
if (model?.BeatmapSet?.OnlineInfo == null)
|
||||
return null;
|
||||
|
||||
var localBeatmap = beatmaps.GetWorkingBeatmap(model);
|
||||
|
||||
if (localBeatmap.BeatmapInfo.ID == 0 && model?.BeatmapSet?.OnlineInfo != null)
|
||||
drawable = new BeatmapSetCover(model.BeatmapSet, beatmapSetCoverType);
|
||||
else
|
||||
drawable = new BeatmapBackgroundSprite(localBeatmap);
|
||||
Drawable drawable = new BeatmapSetCover(model.BeatmapSet, beatmapSetCoverType);
|
||||
|
||||
drawable.RelativeSizeAxes = Axes.Both;
|
||||
drawable.Anchor = Anchor.Centre;
|
||||
|
Loading…
Reference in New Issue
Block a user