1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:12:54 +08:00

Fix username not displaying correctly in overlay

This commit is contained in:
Dean Herbert 2018-12-22 14:40:55 +09:00
parent f47ac35522
commit 870d843fff

View File

@ -115,7 +115,7 @@ namespace osu.Game.Overlays.Profile
Y = -48, Y = -48,
Children = new Drawable[] Children = new Drawable[]
{ {
new OsuSpriteText usernameText = new OsuSpriteText
{ {
Text = user.Username, Text = user.Username,
Font = @"Exo2.0-RegularItalic", Font = @"Exo2.0-RegularItalic",
@ -317,6 +317,8 @@ namespace osu.Game.Overlays.Profile
levelBadge.Texture = textures.Get(@"Profile/levelbadge"); levelBadge.Texture = textures.Get(@"Profile/levelbadge");
} }
private readonly OsuSpriteText usernameText;
private User user; private User user;
public User User public User User
@ -344,6 +346,8 @@ namespace osu.Game.Overlays.Profile
if (user.IsSupporter) if (user.IsSupporter)
SupporterTag.Show(); SupporterTag.Show();
usernameText.Text = user.Username;
if (!string.IsNullOrEmpty(user.Colour)) if (!string.IsNullOrEmpty(user.Colour))
{ {
colourBar.Colour = OsuColour.FromHex(user.Colour); colourBar.Colour = OsuColour.FromHex(user.Colour);