mirror of
https://github.com/osukey/osukey.git
synced 2025-05-23 14:37:39 +09:00
Use 2x size covers in list view
This commit is contained in:
parent
ddc4d45ae8
commit
d541006134
@ -58,7 +58,7 @@ namespace osu.Game.Overlays.Direct
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = Color4.Black,
|
Colour = Color4.Black,
|
||||||
},
|
},
|
||||||
GetBackground(textures),
|
GetBackground(textures, false),
|
||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
@ -56,7 +56,7 @@ namespace osu.Game.Overlays.Direct
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = Color4.Black,
|
Colour = Color4.Black,
|
||||||
},
|
},
|
||||||
GetBackground(textures),
|
GetBackground(textures, true),
|
||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
@ -34,9 +34,9 @@ namespace osu.Game.Overlays.Direct
|
|||||||
return icons;
|
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,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
@ -90,17 +90,19 @@ namespace osu.Game.Overlays.Direct
|
|||||||
private class BeatmapSetBackgroundSprite : Sprite
|
private class BeatmapSetBackgroundSprite : Sprite
|
||||||
{
|
{
|
||||||
private readonly BeatmapSetInfo set;
|
private readonly BeatmapSetInfo set;
|
||||||
|
private readonly bool doubleSize;
|
||||||
|
|
||||||
public BeatmapSetBackgroundSprite(BeatmapSetInfo set)
|
public BeatmapSetBackgroundSprite(BeatmapSetInfo set, bool doubleSize)
|
||||||
{
|
{
|
||||||
this.set = set;
|
this.set = set;
|
||||||
|
this.doubleSize = doubleSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(TextureStore textures)
|
private void load(TextureStore textures)
|
||||||
{
|
{
|
||||||
if (set.OnlineInfo?.Covers?.Card != null)
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user