1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-14 05:07:26 +08:00

Update with online beatmap changes.

This commit is contained in:
DrabWeb 2017-07-13 01:06:46 -03:00
parent dc5ec319a2
commit 0624f578eb
2 changed files with 36 additions and 5 deletions

View File

@ -49,9 +49,15 @@ namespace osu.Desktop.VisualTests.Tests
Title = @"Critical Crystal",
Artist = @"Seiryu",
},
OnlineInfo = new BeatmapOnlineInfo
BeatmapSet = new BeatmapSetInfo
{
Covers = new[] { @"https://assets.ppy.sh//beatmaps/376340/covers/cover.jpg?1456478455" },
OnlineInfo = new BeatmapSetOnlineInfo
{
Covers = new BeatmapSetOnlineCovers
{
Cover = @"https://assets.ppy.sh//beatmaps/376340/covers/cover.jpg?1456478455",
},
},
},
},
},
@ -81,9 +87,15 @@ namespace osu.Desktop.VisualTests.Tests
Title = @"Serendipity",
Artist = @"ZAQ",
},
OnlineInfo = new BeatmapOnlineInfo
BeatmapSet = new BeatmapSetInfo
{
Covers = new[] { @"https://assets.ppy.sh//beatmaps/526839/covers/cover.jpg?1493815706" },
OnlineInfo = new BeatmapSetOnlineInfo
{
Covers = new BeatmapSetOnlineCovers
{
Cover = @"https://assets.ppy.sh//beatmaps/526839/covers/cover.jpg?1493815706",
},
},
},
},
},

View File

@ -9,6 +9,7 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Framework.Localisation;
using osu.Game.Beatmaps.Drawables;
@ -233,7 +234,7 @@ namespace osu.Game.Screens.Multiplayer
coverContainer.FadeIn(transition_duration);
coverContainer.Children = new[]
{
new AsyncLoadWrapper(new BeatmapBackgroundSprite(new OnlineWorkingBeatmap(value, textures, null))
new AsyncLoadWrapper(new BeatmapSetBackgroundSprite(value.BeatmapSet)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
@ -262,5 +263,23 @@ namespace osu.Game.Screens.Multiplayer
{
participantInfo.Participants = value;
}
private class BeatmapSetBackgroundSprite : Sprite
{
private readonly BeatmapSetInfo set;
public BeatmapSetBackgroundSprite(BeatmapSetInfo set)
{
this.set = set;
}
[BackgroundDependencyLoader]
private void load(TextureStore textures)
{
string resource = set.OnlineInfo.Covers.Cover;
if (resource != null)
Texture = textures.Get(resource);
}
}
}
}