mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +08:00
Check if StatisticItem.Name is null or empty
This commit is contained in:
parent
9386d352b8
commit
29ef1c8db8
@ -396,7 +396,7 @@ namespace osu.Game.Rulesets.Mania
|
||||
{
|
||||
Columns = new[]
|
||||
{
|
||||
new StatisticItem(null, () => new SimpleStatisticTable(3, new SimpleStatisticItem[]
|
||||
new StatisticItem(string.Empty, () => new SimpleStatisticTable(3, new SimpleStatisticItem[]
|
||||
{
|
||||
new AverageHitError(score.HitEvents),
|
||||
new UnstableRate(score.HitEvents)
|
||||
|
@ -317,7 +317,7 @@ namespace osu.Game.Rulesets.Osu
|
||||
{
|
||||
Columns = new[]
|
||||
{
|
||||
new StatisticItem(null, () => new SimpleStatisticTable(3, new SimpleStatisticItem[]
|
||||
new StatisticItem(string.Empty, () => new SimpleStatisticTable(3, new SimpleStatisticItem[]
|
||||
{
|
||||
new AverageHitError(timedHitEvents),
|
||||
new UnstableRate(timedHitEvents)
|
||||
|
@ -8,6 +8,7 @@ using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osuTK;
|
||||
@ -59,7 +60,7 @@ namespace osu.Game.Screens.Ranking.Statistics
|
||||
|
||||
private static Drawable createHeader(StatisticItem item)
|
||||
{
|
||||
if (item.Name == null)
|
||||
if (LocalisableString.IsNullOrEmpty(item.Name))
|
||||
return Empty();
|
||||
|
||||
return new FillFlowContainer
|
||||
@ -82,7 +83,7 @@ namespace osu.Game.Screens.Ranking.Statistics
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
Text = item.Name.Value,
|
||||
Text = item.Name,
|
||||
Font = OsuFont.GetFont(size: 14, weight: FontWeight.SemiBold),
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user