mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:33:30 +08:00
Combine other cases of displaying dash in scores PP
This commit is contained in:
parent
706a16677c
commit
2ae616a88e
@ -181,7 +181,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
if (showPerformancePoints)
|
||||
{
|
||||
if (!score.Ranked)
|
||||
content.Add(new UnrankedPerformancePointsPlaceholder { Font = OsuFont.GetFont(size: text_size) });
|
||||
content.Add(new UnrankedPerformancePointsPlaceholder(ScoresStrings.StatusNoPp) { Font = OsuFont.GetFont(size: text_size) });
|
||||
else if (score.PP == null)
|
||||
content.Add(new UnprocessedPerformancePointsPlaceholder { Size = new Vector2(text_size) });
|
||||
else
|
||||
|
@ -126,7 +126,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
ppColumn.Alpha = value.BeatmapInfo!.Status.GrantsPerformancePoints() ? 1 : 0;
|
||||
|
||||
if (!value.Ranked)
|
||||
ppColumn.Drawable = new UnrankedPerformancePointsPlaceholder { Font = smallFont };
|
||||
ppColumn.Drawable = new UnrankedPerformancePointsPlaceholder(ScoresStrings.StatusNoPp) { Font = smallFont };
|
||||
else if (value.PP is not double pp)
|
||||
ppColumn.Drawable = new UnprocessedPerformancePointsPlaceholder { Size = new Vector2(smallFont.Size) };
|
||||
else
|
||||
|
@ -14,6 +14,7 @@ using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Online.Leaderboards;
|
||||
using osu.Game.Resources.Localisation.Web;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.UI;
|
||||
@ -243,20 +244,19 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
|
||||
if (Score.Beatmap?.Status.GrantsPerformancePoints() != true)
|
||||
{
|
||||
return new OsuSpriteText
|
||||
return new UnrankedPerformancePointsPlaceholder(UsersStrings.ShowExtraTopRanksNotRanked)
|
||||
{
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Bold),
|
||||
Text = "-",
|
||||
Colour = colourProvider.Highlight1
|
||||
Colour = colourProvider.Highlight1,
|
||||
};
|
||||
}
|
||||
|
||||
if (!Score.Ranked)
|
||||
{
|
||||
return new UnrankedPerformancePointsPlaceholder
|
||||
return new UnrankedPerformancePointsPlaceholder(ScoresStrings.StatusNoPp)
|
||||
{
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Bold),
|
||||
Colour = colourProvider.Highlight1
|
||||
Colour = colourProvider.Highlight1,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -5,22 +5,22 @@ 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 that do not award PP.
|
||||
/// A placeholder used in PP columns for scores that do not award PP due to a reason specified by <see cref="TooltipText"/>.
|
||||
/// </summary>
|
||||
public partial class UnrankedPerformancePointsPlaceholder : SpriteText, IHasTooltip
|
||||
{
|
||||
public LocalisableString TooltipText => ScoresStrings.StatusNoPp;
|
||||
public LocalisableString TooltipText { get; }
|
||||
|
||||
public UnrankedPerformancePointsPlaceholder()
|
||||
public UnrankedPerformancePointsPlaceholder(LocalisableString tooltipText)
|
||||
{
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
Text = "-";
|
||||
TooltipText = tooltipText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user