1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:07:52 +08:00

Add comments

This commit is contained in:
StanR 2024-01-03 17:39:48 +06:00
parent 3df7430d2e
commit 7262fef67f
3 changed files with 16 additions and 9 deletions

View File

@ -91,6 +91,7 @@ namespace osu.Game.Users
Children = new Drawable[]
{
CreateFlag(),
// supporter icon is being added later
}
}
},
@ -108,6 +109,7 @@ namespace osu.Game.Users
},
new[]
{
// padding
Empty(),
Empty()
},

View File

@ -100,13 +100,9 @@ namespace osu.Game.Users
protected abstract Drawable CreateLayout();
protected OsuSpriteText CreateUsername() => new OsuSpriteText
{
Font = OsuFont.GetFont(size: 16, weight: FontWeight.Bold),
Shadow = false,
Text = User.Username,
};
/// <summary>
/// Panel background container. Can be null if a panel doesn't want a background under it's layout
/// </summary>
protected virtual Drawable? CreateBackground() => Background = new UserCoverBackground
{
RelativeSizeAxes = Axes.Both,
@ -115,6 +111,13 @@ namespace osu.Game.Users
User = User
};
protected OsuSpriteText CreateUsername() => new OsuSpriteText
{
Font = OsuFont.GetFont(size: 16, weight: FontWeight.Bold),
Shadow = false,
Text = User.Username,
};
protected UpdateableAvatar CreateAvatar() => new UpdateableAvatar(User, false);
protected UpdateableFlag CreateFlag() => new UpdateableFlag(User.CountryCode)

View File

@ -96,6 +96,7 @@ namespace osu.Game.Users
{
new[]
{
// padding
Empty(),
Empty(),
Empty(),
@ -103,7 +104,7 @@ namespace osu.Game.Users
},
new[]
{
Empty(),
Empty(), // padding
CreateAvatar().With(avatar =>
{
avatar.Size = new Vector2(60);
@ -138,6 +139,7 @@ namespace osu.Game.Users
Children = new Drawable[]
{
CreateFlag(),
// supporter icon is being added later
}
}
},
@ -152,7 +154,7 @@ namespace osu.Game.Users
}
}
},
Empty()
Empty() // padding
}
}
}