From 1ceb59d78e01fcad369c62e842a1c144c5f68df0 Mon Sep 17 00:00:00 2001 From: Salman Alshamrani Date: Wed, 18 Jun 2025 01:52:26 +0300 Subject: [PATCH] Adjust rank formatting logic to avoid getting cut in score --- .../Visual/SongSelectV2/TestSceneBeatmapLeaderboardScore.cs | 3 ++- osu.Game/Utils/FormatUtils.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/osu.Game.Tests/Visual/SongSelectV2/TestSceneBeatmapLeaderboardScore.cs b/osu.Game.Tests/Visual/SongSelectV2/TestSceneBeatmapLeaderboardScore.cs index 7ef8da7673..0aca2d6a1c 100644 --- a/osu.Game.Tests/Visual/SongSelectV2/TestSceneBeatmapLeaderboardScore.cs +++ b/osu.Game.Tests/Visual/SongSelectV2/TestSceneBeatmapLeaderboardScore.cs @@ -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, diff --git a/osu.Game/Utils/FormatUtils.cs b/osu.Game/Utils/FormatUtils.cs index f7250c6833..122bc6d326 100644 --- a/osu.Game/Utils/FormatUtils.cs +++ b/osu.Game/Utils/FormatUtils.cs @@ -30,7 +30,7 @@ namespace osu.Game.Utils /// Formats the supplied rank/leaderboard position in a consistent, simplified way. /// /// The rank/position to be formatted. - 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); /// /// Formats the supplied star rating in a consistent, simplified way.