diff --git a/osu.Desktop.VisualTests/Tests/TestCaseLeaderboard.cs b/osu.Desktop.VisualTests/Tests/TestCaseLeaderboard.cs index 0396a2d81b..df620b218d 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseLeaderboard.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseLeaderboard.cs @@ -24,7 +24,7 @@ namespace osu.Desktop.VisualTests.Tests { new Score { - Rank = ScoreRank.SSPlus, + Rank = ScoreRank.XH, Accuracy = 100, MaxCombo = 244, TotalScore = 1707827, @@ -42,7 +42,7 @@ namespace osu.Desktop.VisualTests.Tests }, new Score { - Rank = ScoreRank.SS, + Rank = ScoreRank.X, Accuracy = 100, MaxCombo = 244, TotalScore = 1707827, @@ -60,7 +60,7 @@ namespace osu.Desktop.VisualTests.Tests }, new Score { - Rank = ScoreRank.SPlus, + Rank = ScoreRank.SH, Accuracy = 100, MaxCombo = 244, TotalScore = 1707827, diff --git a/osu.Game/Modes/ScoreRank.cs b/osu.Game/Modes/ScoreRank.cs index 3e14384770..433158f249 100644 --- a/osu.Game/Modes/ScoreRank.cs +++ b/osu.Game/Modes/ScoreRank.cs @@ -1,17 +1,29 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using System.ComponentModel; + namespace osu.Game.Modes { public enum ScoreRank { + [Description(@"F")] F, + [Description(@"F")] + D, + [Description(@"C")] C, + [Description(@"B")] B, + [Description(@"A")] A, + [Description(@"S")] S, - SPlus, - SS, - SSPlus, + [Description(@"SPlus")] + SH, + [Description(@"SS")] + X, + [Description(@"SSPlus")] + XH, } } diff --git a/osu.Game/Screens/Select/Leaderboards/DrawableRank.cs b/osu.Game/Screens/Select/Leaderboards/DrawableRank.cs index 048ce50de8..0d9d0cf451 100644 --- a/osu.Game/Screens/Select/Leaderboards/DrawableRank.cs +++ b/osu.Game/Screens/Select/Leaderboards/DrawableRank.cs @@ -7,7 +7,7 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Textures; using osu.Game.Modes; -using System; +using osu.Framework.Extensions; namespace osu.Game.Screens.Select.Leaderboards { @@ -24,7 +24,7 @@ namespace osu.Game.Screens.Select.Leaderboards { if (value == rank) return; rank = value; - sprite.Texture = textures.Get($@"Badges/ScoreRanks/{Enum.GetName(typeof(ScoreRank), rank)}"); + sprite.Texture = textures.Get($@"Badges/ScoreRanks/{rank.GetDescription()}"); } } @@ -32,7 +32,7 @@ namespace osu.Game.Screens.Select.Leaderboards private void load(TextureStore ts) { textures = ts; - sprite.Texture = textures.Get($@"Badges/ScoreRanks/{Enum.GetName(typeof(ScoreRank), rank)}"); + sprite.Texture = textures.Get($@"Badges/ScoreRanks/{rank.GetDescription()}"); } public DrawableRank(ScoreRank rank)