1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 06:42:54 +08:00

Display exclamation triangle on scores with unprocessed PP

This commit is contained in:
Salman Ahmed 2022-07-25 07:30:52 +03:00
parent 3beb1da3de
commit 54eb2b98a9

View File

@ -23,6 +23,7 @@ using osuTK.Graphics;
using osu.Framework.Localisation;
using osu.Framework.Extensions.LocalisationExtensions;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Sprites;
using osu.Game.Resources.Localisation.Web;
namespace osu.Game.Overlays.BeatmapSet.Scores
@ -177,7 +178,12 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
}
if (showPerformancePoints)
content.Add(new StatisticText(score.PP, format: @"N0"));
{
if (score.PP != null)
content.Add(new StatisticText(score.PP, format: @"N0"));
else
content.Add(new ProcessingPPIcon());
}
content.Add(new ScoreboardTime(score.Date, text_size)
{
@ -241,5 +247,18 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
Colour = colours.GreenLight;
}
}
private class ProcessingPPIcon : SpriteIcon, IHasTooltip
{
public LocalisableString TooltipText => ScoresStrings.StatusProcessing;
public ProcessingPPIcon()
{
Anchor = Anchor.Centre;
Origin = Anchor.Centre;
Size = new Vector2(text_size);
Icon = FontAwesome.Solid.ExclamationTriangle;
}
}
}
}