Merge https://github.com/ppy/osu into drawable-room-update

This commit is contained in:
DrabWeb
2017-07-13 01:00:32 -03:00
54 changed files with 514 additions and 278 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;
@ -278,11 +278,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 = colours.Gray9;
@ -333,7 +332,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,
@ -410,5 +409,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);
}
}
}
}