mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:33:30 +08:00
Separate unprocessed PP placeholder to own class
This commit is contained in:
parent
fa1bc0fe0e
commit
91d1c9686c
@ -23,8 +23,8 @@ 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;
|
||||
using osu.Game.Scoring.Drawables;
|
||||
|
||||
namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
{
|
||||
@ -182,7 +182,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
if (score.PP != null)
|
||||
content.Add(new StatisticText(score.PP, format: @"N0"));
|
||||
else
|
||||
content.Add(new ProcessingPPIcon());
|
||||
content.Add(new UnprocessedPerformancePointsPlaceholder { Size = new Vector2(text_size) });
|
||||
}
|
||||
|
||||
content.Add(new ScoreboardTime(score.Date, text_size)
|
||||
@ -247,18 +247,5 @@ 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,27 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
#nullable disable
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Resources.Localisation.Web;
|
||||
|
||||
namespace osu.Game.Scoring.Drawables
|
||||
{
|
||||
/// <summary>
|
||||
/// A placeholder used in PP columns for scores with unprocessed PP value.
|
||||
/// </summary>
|
||||
public class UnprocessedPerformancePointsPlaceholder : SpriteIcon, IHasTooltip
|
||||
{
|
||||
public LocalisableString TooltipText => ScoresStrings.StatusProcessing;
|
||||
|
||||
public UnprocessedPerformancePointsPlaceholder()
|
||||
{
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
Icon = FontAwesome.Solid.ExclamationTriangle;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user