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