mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:52:55 +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
|
namespace osu.Game.Beatmaps.Drawables
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
public class UpdateableBeatmapBackgroundSprite : ModelBackedDrawable<BeatmapInfo>
|
public class UpdateableBeatmapBackgroundSprite : ModelBackedDrawable<BeatmapInfo>
|
||||||
{
|
{
|
||||||
@ -30,14 +30,10 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
{
|
{
|
||||||
return new DelayedLoadUnloadWrapper(() =>
|
return new DelayedLoadUnloadWrapper(() =>
|
||||||
{
|
{
|
||||||
Drawable drawable;
|
if (model?.BeatmapSet?.OnlineInfo == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
var localBeatmap = beatmaps.GetWorkingBeatmap(model);
|
Drawable drawable = new BeatmapSetCover(model.BeatmapSet, beatmapSetCoverType);
|
||||||
|
|
||||||
if (localBeatmap.BeatmapInfo.ID == 0 && model?.BeatmapSet?.OnlineInfo != null)
|
|
||||||
drawable = new BeatmapSetCover(model.BeatmapSet, beatmapSetCoverType);
|
|
||||||
else
|
|
||||||
drawable = new BeatmapBackgroundSprite(localBeatmap);
|
|
||||||
|
|
||||||
drawable.RelativeSizeAxes = Axes.Both;
|
drawable.RelativeSizeAxes = Axes.Both;
|
||||||
drawable.Anchor = Anchor.Centre;
|
drawable.Anchor = Anchor.Centre;
|
||||||
|
Loading…
Reference in New Issue
Block a user