1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-24 02:09:54 +08:00

Merge pull request #33753 from frenzibyte/rank-formatting

Adjust rank formatting logic to avoid getting cut in score
This commit is contained in:
Dean Herbert
2025-06-18 16:09:46 +09:00
committed by GitHub
Unverified
2 changed files with 3 additions and 2 deletions
@@ -53,6 +53,7 @@ namespace osu.Game.Tests.Visual.SongSelectV2
{
fillFlow = new FillFlowContainer
{
X = 100,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.X,
@@ -281,7 +282,7 @@ namespace osu.Game.Tests.Visual.SongSelectV2
},
new ScoreInfo
{
Position = 110000,
Position = 2233,
Rank = ScoreRank.D,
Accuracy = 1,
MaxCombo = 244,
+1 -1
View File
@@ -30,7 +30,7 @@ namespace osu.Game.Utils
/// Formats the supplied rank/leaderboard position in a consistent, simplified way.
/// </summary>
/// <param name="rank">The rank/position to be formatted.</param>
public static string FormatRank(this int rank) => rank.ToMetric(decimals: rank < 100_000 ? 1 : 0);
public static string FormatRank(this int rank) => rank.ToMetric(decimals: rank < 10_000 ? 1 : 0);
/// <summary>
/// Formats the supplied star rating in a consistent, simplified way.