1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 22:22:54 +08:00

Rename ScoreRanks to be in line with current API.

This commit is contained in:
Dean Herbert 2017-03-15 13:55:29 +09:00
parent 253bcebf51
commit d96a78459d
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49
3 changed files with 21 additions and 9 deletions

View File

@ -24,7 +24,7 @@ namespace osu.Desktop.VisualTests.Tests
{ {
new Score new Score
{ {
Rank = ScoreRank.SSPlus, Rank = ScoreRank.XH,
Accuracy = 100, Accuracy = 100,
MaxCombo = 244, MaxCombo = 244,
TotalScore = 1707827, TotalScore = 1707827,
@ -42,7 +42,7 @@ namespace osu.Desktop.VisualTests.Tests
}, },
new Score new Score
{ {
Rank = ScoreRank.SS, Rank = ScoreRank.X,
Accuracy = 100, Accuracy = 100,
MaxCombo = 244, MaxCombo = 244,
TotalScore = 1707827, TotalScore = 1707827,
@ -60,7 +60,7 @@ namespace osu.Desktop.VisualTests.Tests
}, },
new Score new Score
{ {
Rank = ScoreRank.SPlus, Rank = ScoreRank.SH,
Accuracy = 100, Accuracy = 100,
MaxCombo = 244, MaxCombo = 244,
TotalScore = 1707827, TotalScore = 1707827,

View File

@ -1,17 +1,29 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.ComponentModel;
namespace osu.Game.Modes namespace osu.Game.Modes
{ {
public enum ScoreRank public enum ScoreRank
{ {
[Description(@"F")]
F, F,
[Description(@"F")]
D,
[Description(@"C")]
C, C,
[Description(@"B")]
B, B,
[Description(@"A")]
A, A,
[Description(@"S")]
S, S,
SPlus, [Description(@"SPlus")]
SS, SH,
SSPlus, [Description(@"SS")]
X,
[Description(@"SSPlus")]
XH,
} }
} }

View File

@ -7,7 +7,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Textures;
using osu.Game.Modes; using osu.Game.Modes;
using System; using osu.Framework.Extensions;
namespace osu.Game.Screens.Select.Leaderboards namespace osu.Game.Screens.Select.Leaderboards
{ {
@ -24,7 +24,7 @@ namespace osu.Game.Screens.Select.Leaderboards
{ {
if (value == rank) return; if (value == rank) return;
rank = value; 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) private void load(TextureStore ts)
{ {
textures = 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) public DrawableRank(ScoreRank rank)