Move namespace and make cover background public.

This commit is contained in:
Huo Yaoyuan
2017-05-27 23:37:15 +08:00
parent 25387c996f
commit 159e8d84c2
6 changed files with 41 additions and 29 deletions

View File

@ -9,7 +9,6 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
@ -43,7 +42,7 @@ namespace osu.Game.Users
Children = new Drawable[]
{
new AsyncLoadWrapper(new CoverBackgroundSprite(user)
new AsyncLoadWrapper(new UserCoverBackground(user)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
@ -193,22 +192,5 @@ namespace osu.Game.Users
statusMessage.Text = status.Message;
}
}
private class CoverBackgroundSprite : Sprite
{
private readonly User user;
public CoverBackgroundSprite(User user)
{
this.user = user;
}
[BackgroundDependencyLoader]
private void load(TextureStore textures)
{
if (!string.IsNullOrEmpty(user.CoverUrl))
Texture = textures.Get(user.CoverUrl);
}
}
}
}