mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Move namespace and make cover background public.
This commit is contained in:
26
osu.Game/Users/UserCoverBackground.cs
Normal file
26
osu.Game/Users/UserCoverBackground.cs
Normal file
@ -0,0 +1,26 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
|
||||
namespace osu.Game.Users
|
||||
{
|
||||
public class UserCoverBackground : Sprite
|
||||
{
|
||||
private readonly User user;
|
||||
|
||||
public UserCoverBackground(User user)
|
||||
{
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(TextureStore textures)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(user.CoverUrl))
|
||||
Texture = textures.Get(user.CoverUrl);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user