mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 12:33:01 +08:00
remove UpdateableCountryText
This commit is contained in:
parent
4d144cd5b5
commit
17730f05bc
@ -21,7 +21,6 @@ using osu.Game.Users;
|
||||
using osu.Game.Users.Drawables;
|
||||
using osuTK;
|
||||
|
||||
|
||||
namespace osu.Game.Overlays.Profile.Header
|
||||
{
|
||||
public partial class TopHeaderContainer : CompositeDrawable
|
||||
@ -41,7 +40,6 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
private ExternalLinkButton openUserExternally = null!;
|
||||
private OsuSpriteText titleText = null!;
|
||||
private UpdateableFlag userFlag = null!;
|
||||
private UpdateableCountryText userCountryText = null!;
|
||||
private GroupBadgeFlow groupBadgeFlow = null!;
|
||||
private ToggleCoverButton coverToggle = null!;
|
||||
|
||||
@ -204,7 +202,6 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
usernameText.Text = user?.Username ?? string.Empty;
|
||||
openUserExternally.Link = $@"{api.WebsiteRootUrl}/users/{user?.Id ?? 0}";
|
||||
userFlag.CountryCode = user?.CountryCode ?? default;
|
||||
userCountryText.load(user?.CountryCode ?? default);
|
||||
supporterTag.SupportLevel = user?.SupportLevel ?? 0;
|
||||
titleText.Text = user?.Title ?? string.Empty;
|
||||
titleText.Colour = Color4Extensions.FromHex(user?.Colour ?? "fff");
|
||||
@ -232,33 +229,5 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
Masking = true;
|
||||
}
|
||||
}
|
||||
|
||||
private partial class UpdateableCountryText : OsuHoverContainer
|
||||
{
|
||||
|
||||
public FontUsage Font = default;
|
||||
|
||||
[Resolved]
|
||||
private RankingsOverlay? rankingsOverlay { get; set; }
|
||||
|
||||
public UpdateableCountryText()
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
}
|
||||
|
||||
public void load(CountryCode countryCode)
|
||||
{
|
||||
Action = () =>
|
||||
{
|
||||
rankingsOverlay?.ShowCountry(countryCode);
|
||||
};
|
||||
|
||||
Child = new OsuSpriteText
|
||||
{
|
||||
Font = Font,
|
||||
Text = countryCode.GetDescription(),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user