mirror of
https://github.com/osukey/osukey.git
synced 2025-05-20 21:17:32 +09: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 osu.Game.Users.Drawables;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Profile.Header
|
namespace osu.Game.Overlays.Profile.Header
|
||||||
{
|
{
|
||||||
public partial class TopHeaderContainer : CompositeDrawable
|
public partial class TopHeaderContainer : CompositeDrawable
|
||||||
@ -41,7 +40,6 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
private ExternalLinkButton openUserExternally = null!;
|
private ExternalLinkButton openUserExternally = null!;
|
||||||
private OsuSpriteText titleText = null!;
|
private OsuSpriteText titleText = null!;
|
||||||
private UpdateableFlag userFlag = null!;
|
private UpdateableFlag userFlag = null!;
|
||||||
private UpdateableCountryText userCountryText = null!;
|
|
||||||
private GroupBadgeFlow groupBadgeFlow = null!;
|
private GroupBadgeFlow groupBadgeFlow = null!;
|
||||||
private ToggleCoverButton coverToggle = null!;
|
private ToggleCoverButton coverToggle = null!;
|
||||||
|
|
||||||
@ -204,7 +202,6 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
usernameText.Text = user?.Username ?? string.Empty;
|
usernameText.Text = user?.Username ?? string.Empty;
|
||||||
openUserExternally.Link = $@"{api.WebsiteRootUrl}/users/{user?.Id ?? 0}";
|
openUserExternally.Link = $@"{api.WebsiteRootUrl}/users/{user?.Id ?? 0}";
|
||||||
userFlag.CountryCode = user?.CountryCode ?? default;
|
userFlag.CountryCode = user?.CountryCode ?? default;
|
||||||
userCountryText.load(user?.CountryCode ?? default);
|
|
||||||
supporterTag.SupportLevel = user?.SupportLevel ?? 0;
|
supporterTag.SupportLevel = user?.SupportLevel ?? 0;
|
||||||
titleText.Text = user?.Title ?? string.Empty;
|
titleText.Text = user?.Title ?? string.Empty;
|
||||||
titleText.Colour = Color4Extensions.FromHex(user?.Colour ?? "fff");
|
titleText.Colour = Color4Extensions.FromHex(user?.Colour ?? "fff");
|
||||||
@ -232,33 +229,5 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
Masking = true;
|
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…
x
Reference in New Issue
Block a user