Adjust country name design

This commit is contained in:
Andrei Zavatski
2020-02-13 19:01:26 +03:00
parent c1924535ff
commit e67e4f708e

View File

@ -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;
}
}
}
}