From d54100613442034d67cb5fea5770c0d5ed07e4c9 Mon Sep 17 00:00:00 2001 From: DrabWeb Date: Wed, 7 Jun 2017 12:15:11 -0300 Subject: [PATCH] Use 2x size covers in list view --- osu.Game/Overlays/Direct/DirectGridPanel.cs | 2 +- osu.Game/Overlays/Direct/DirectListPanel.cs | 2 +- osu.Game/Overlays/Direct/DirectPanel.cs | 10 ++++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/osu.Game/Overlays/Direct/DirectGridPanel.cs b/osu.Game/Overlays/Direct/DirectGridPanel.cs index 4a1fad41d9..5a1bb609b2 100644 --- a/osu.Game/Overlays/Direct/DirectGridPanel.cs +++ b/osu.Game/Overlays/Direct/DirectGridPanel.cs @@ -58,7 +58,7 @@ namespace osu.Game.Overlays.Direct RelativeSizeAxes = Axes.Both, Colour = Color4.Black, }, - GetBackground(textures), + GetBackground(textures, false), new Box { RelativeSizeAxes = Axes.Both, diff --git a/osu.Game/Overlays/Direct/DirectListPanel.cs b/osu.Game/Overlays/Direct/DirectListPanel.cs index fc44004df6..c4b941a362 100644 --- a/osu.Game/Overlays/Direct/DirectListPanel.cs +++ b/osu.Game/Overlays/Direct/DirectListPanel.cs @@ -56,7 +56,7 @@ namespace osu.Game.Overlays.Direct RelativeSizeAxes = Axes.Both, Colour = Color4.Black, }, - GetBackground(textures), + GetBackground(textures, true), new Box { RelativeSizeAxes = Axes.Both, diff --git a/osu.Game/Overlays/Direct/DirectPanel.cs b/osu.Game/Overlays/Direct/DirectPanel.cs index 1c007dd534..45ca51b4b0 100644 --- a/osu.Game/Overlays/Direct/DirectPanel.cs +++ b/osu.Game/Overlays/Direct/DirectPanel.cs @@ -34,9 +34,9 @@ namespace osu.Game.Overlays.Direct return icons; } - protected Drawable GetBackground(TextureStore textures) + protected Drawable GetBackground(TextureStore textures, bool doubleSize) { - return new AsyncLoadWrapper(new BeatmapSetBackgroundSprite(SetInfo) + return new AsyncLoadWrapper(new BeatmapSetBackgroundSprite(SetInfo, doubleSize) { Anchor = Anchor.Centre, Origin = Anchor.Centre, @@ -90,17 +90,19 @@ namespace osu.Game.Overlays.Direct private class BeatmapSetBackgroundSprite : Sprite { private readonly BeatmapSetInfo set; + private readonly bool doubleSize; - public BeatmapSetBackgroundSprite(BeatmapSetInfo set) + public BeatmapSetBackgroundSprite(BeatmapSetInfo set, bool doubleSize) { this.set = set; + this.doubleSize = doubleSize; } [BackgroundDependencyLoader] private void load(TextureStore textures) { if (set.OnlineInfo?.Covers?.Card != null) - Texture = textures.Get(set.OnlineInfo.Covers.Card); + Texture = textures.Get(doubleSize ? set.OnlineInfo.Covers.Card2x : set.OnlineInfo.Covers.Card); } } }