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:
parent
1e356f6137
commit
6e13cf82e8
@ -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),
|
||||
}
|
||||
}
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user