mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Adjust country name design
This commit is contained in:
@ -8,6 +8,7 @@ using osu.Game.Users;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics;
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Allocation;
|
||||
|
||||
namespace osu.Game.Overlays.Rankings.Tables
|
||||
{
|
||||
@ -30,11 +31,7 @@ namespace osu.Game.Overlays.Rankings.Tables
|
||||
|
||||
protected override Country GetCountry(CountryStatistics item) => item.Country;
|
||||
|
||||
protected override Drawable CreateFlagContent(CountryStatistics item) => new OsuSpriteText
|
||||
{
|
||||
Font = OsuFont.GetFont(size: TEXT_SIZE),
|
||||
Text = $@"{item.Country.FullName}",
|
||||
};
|
||||
protected override Drawable CreateFlagContent(CountryStatistics item) => new CountryName(item.Country);
|
||||
|
||||
protected override Drawable[] CreateAdditionalContent(CountryStatistics item) => new Drawable[]
|
||||
{
|
||||
@ -63,5 +60,20 @@ namespace osu.Game.Overlays.Rankings.Tables
|
||||
Text = $@"{item.Performance / Math.Max(item.ActiveUsers, 1):N0}",
|
||||
}
|
||||
};
|
||||
|
||||
private class CountryName : OsuSpriteText
|
||||
{
|
||||
public CountryName(Country country)
|
||||
{
|
||||
Font = OsuFont.GetFont(size: 12, italics: true);
|
||||
Text = $@"{country.FullName}";
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
Colour = colourProvider.Light2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user