mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Country
-> CountryCode
This commit is contained in:
@ -34,9 +34,9 @@ namespace osu.Game.Overlays.Rankings.Tables
|
||||
new RankingsTableColumn(RankingsStrings.StatAveragePerformance, Anchor.Centre, new Dimension(GridSizeMode.AutoSize)),
|
||||
};
|
||||
|
||||
protected override Country GetCountry(CountryStatistics item) => item.Country;
|
||||
protected override CountryCode GetCountryCode(CountryStatistics item) => item.Code;
|
||||
|
||||
protected override Drawable CreateFlagContent(CountryStatistics item) => new CountryName(item.Country);
|
||||
protected override Drawable CreateFlagContent(CountryStatistics item) => new CountryName(item.Code);
|
||||
|
||||
protected override Drawable[] CreateAdditionalContent(CountryStatistics item) => new Drawable[]
|
||||
{
|
||||
@ -71,15 +71,15 @@ namespace osu.Game.Overlays.Rankings.Tables
|
||||
[Resolved(canBeNull: true)]
|
||||
private RankingsOverlay rankings { get; set; }
|
||||
|
||||
public CountryName(Country country)
|
||||
public CountryName(CountryCode countryCode)
|
||||
: base(t => t.Font = OsuFont.GetFont(size: 12))
|
||||
{
|
||||
AutoSizeAxes = Axes.X;
|
||||
RelativeSizeAxes = Axes.Y;
|
||||
TextAnchor = Anchor.CentreLeft;
|
||||
|
||||
if (country != default)
|
||||
AddLink(country.GetDescription(), () => rankings?.ShowCountry(country));
|
||||
if (countryCode != default)
|
||||
AddLink(countryCode.GetDescription(), () => rankings?.ShowCountry(countryCode));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ namespace osu.Game.Overlays.Rankings.Tables
|
||||
protected sealed override Drawable CreateHeader(int index, TableColumn column)
|
||||
=> (column as RankingsTableColumn)?.CreateHeaderText() ?? new HeaderText(column?.Header ?? default, false);
|
||||
|
||||
protected abstract Country GetCountry(TModel item);
|
||||
protected abstract CountryCode GetCountryCode(TModel item);
|
||||
|
||||
protected abstract Drawable CreateFlagContent(TModel item);
|
||||
|
||||
@ -97,7 +97,7 @@ namespace osu.Game.Overlays.Rankings.Tables
|
||||
Margin = new MarginPadding { Bottom = row_spacing },
|
||||
Children = new[]
|
||||
{
|
||||
new UpdateableFlag(GetCountry(item))
|
||||
new UpdateableFlag(GetCountryCode(item))
|
||||
{
|
||||
Size = new Vector2(28, 20),
|
||||
ShowPlaceholderOnUnknown = false,
|
||||
|
@ -59,7 +59,7 @@ namespace osu.Game.Overlays.Rankings.Tables
|
||||
.Concat(GradeColumns.Select(grade => new GradeTableColumn(grade, Anchor.Centre, new Dimension(GridSizeMode.AutoSize))))
|
||||
.ToArray();
|
||||
|
||||
protected sealed override Country GetCountry(UserStatistics item) => item.User.Country;
|
||||
protected sealed override CountryCode GetCountryCode(UserStatistics item) => item.User.CountryCode;
|
||||
|
||||
protected sealed override Drawable CreateFlagContent(UserStatistics item)
|
||||
{
|
||||
|
Reference in New Issue
Block a user