Merge remote-tracking branch 'ppy/master' into right-mouse-scrollbar

This commit is contained in:
Dean Herbert
2017-07-14 06:23:07 +09:00
39 changed files with 494 additions and 169 deletions

View File

@ -12,6 +12,7 @@ using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Framework.Localisation;
using osu.Game.Beatmaps.Drawables;
@ -46,7 +47,6 @@ namespace osu.Game.Screens.Multiplayer
private OsuColour colours;
private LocalisationEngine localisation;
private TextureStore textures;
private Room room;
@ -368,11 +368,10 @@ namespace osu.Game.Screens.Multiplayer
}
[BackgroundDependencyLoader]
private void load(OsuColour colours, LocalisationEngine localisation, TextureStore textures)
private void load(OsuColour colours, LocalisationEngine localisation)
{
this.localisation = localisation;
this.colours = colours;
this.textures = textures;
beatmapAuthor.Colour = levelRangeContainer.Colour = colours.Gray9;
host.Colour = colours.Blue;
@ -437,7 +436,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 CoverSprite(value.BeatmapSet)
{
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre,
@ -528,5 +527,22 @@ namespace osu.Game.Screens.Multiplayer
};
}
}
private class CoverSprite : Sprite
{
private readonly BeatmapSetInfo set;
public CoverSprite(BeatmapSetInfo set)
{
this.set = set;
}
[BackgroundDependencyLoader]
private void load(TextureStore textures)
{
if (set.OnlineInfo?.Covers?.Cover != null)
Texture = textures.Get(set.OnlineInfo.Covers.Cover);
}
}
}
}