1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Don't render statistic header if display string is null

This commit is contained in:
naoei 2022-08-10 16:05:34 -04:00
parent 1e356f6137
commit 6e13cf82e8
2 changed files with 3 additions and 3 deletions

View File

@ -59,7 +59,7 @@ namespace osu.Game.Screens.Ranking.Statistics
private static Drawable createHeader(StatisticItem item)
{
if (string.IsNullOrEmpty(item.Name))
if (item.Name == null)
return Empty();
return new FillFlowContainer
@ -82,7 +82,7 @@ namespace osu.Game.Screens.Ranking.Statistics
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Text = item.Name,
Text = item.Name.Value,
Font = OsuFont.GetFont(size: 14, weight: FontWeight.SemiBold),
}
}

View File

@ -19,7 +19,7 @@ namespace osu.Game.Screens.Ranking.Statistics
/// <summary>
/// The name of this item.
/// </summary>
public readonly LocalisableString Name;
public readonly LocalisableString? Name;
/// <summary>
/// A function returning the <see cref="Drawable"/> content to be displayed.