From 6f2bc943eb57c0a0ec97de5053c1d9cbd91249d0 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 21 Apr 2019 12:04:15 +0800 Subject: [PATCH 1/4] Fix rank display on break info display --- osu.Game/Screens/Play/Break/BreakInfoLine.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Play/Break/BreakInfoLine.cs b/osu.Game/Screens/Play/Break/BreakInfoLine.cs index 4b07405812..70e7b8f297 100644 --- a/osu.Game/Screens/Play/Break/BreakInfoLine.cs +++ b/osu.Game/Screens/Play/Break/BreakInfoLine.cs @@ -1,8 +1,10 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using System; using osu.Framework.Allocation; using osu.Framework.Bindables; +using osu.Framework.Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Graphics; @@ -60,7 +62,13 @@ namespace osu.Game.Screens.Play.Break valueText.Text = newText; } - protected virtual string Format(T count) => count.ToString(); + protected virtual string Format(T count) + { + if (count is Enum countEnum) + return countEnum.GetDescription(); + + return count.ToString(); + } [BackgroundDependencyLoader] private void load(OsuColour colours) From 30d4dd93558f00bb806612040568e3827ec41d3e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 21 Apr 2019 21:38:12 +0900 Subject: [PATCH 2/4] Change + rank strings to be cleaner for the end-user --- osu.Game/Scoring/ScoreRank.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Scoring/ScoreRank.cs b/osu.Game/Scoring/ScoreRank.cs index 82c33748bb..a93d015f1b 100644 --- a/osu.Game/Scoring/ScoreRank.cs +++ b/osu.Game/Scoring/ScoreRank.cs @@ -25,13 +25,13 @@ namespace osu.Game.Scoring [Description(@"S")] S, - [Description(@"SPlus")] + [Description(@"S+")] SH, [Description(@"SS")] X, - [Description(@"SSPlus")] + [Description(@"SS+")] XH, } } From ae51a9e45122e453dcfc49bb237c55882854b140 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 22 Apr 2019 09:57:33 +0900 Subject: [PATCH 3/4] Fix drawable rank texture lookup --- osu.Game/Online/Leaderboards/DrawableRank.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/osu.Game/Online/Leaderboards/DrawableRank.cs b/osu.Game/Online/Leaderboards/DrawableRank.cs index 9155df69b4..5224150181 100644 --- a/osu.Game/Online/Leaderboards/DrawableRank.cs +++ b/osu.Game/Online/Leaderboards/DrawableRank.cs @@ -43,7 +43,21 @@ namespace osu.Game.Online.Leaderboards private void updateTexture() { - rankSprite.Texture = textures.Get($@"Grades/{Rank.GetDescription()}"); + string textureName; + switch (Rank) + { + default: + textureName = Rank.GetDescription(); + break; + case ScoreRank.SH: + textureName = "SPlus"; + break; + case ScoreRank.XH: + textureName = "SSPlus"; + break; + } + + rankSprite.Texture = textures.Get($@"Grades/{textureName}"); } public void UpdateRank(ScoreRank newRank) From 99f2ee0e48244308897b1a7bac23bce0ff08a09d Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Tue, 7 May 2019 15:09:03 +0900 Subject: [PATCH 4/4] Fix CI issues --- osu.Game/Online/Leaderboards/DrawableRank.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Game/Online/Leaderboards/DrawableRank.cs b/osu.Game/Online/Leaderboards/DrawableRank.cs index 5224150181..ce64395dde 100644 --- a/osu.Game/Online/Leaderboards/DrawableRank.cs +++ b/osu.Game/Online/Leaderboards/DrawableRank.cs @@ -44,14 +44,17 @@ namespace osu.Game.Online.Leaderboards private void updateTexture() { string textureName; + switch (Rank) { default: textureName = Rank.GetDescription(); break; + case ScoreRank.SH: textureName = "SPlus"; break; + case ScoreRank.XH: textureName = "SSPlus"; break;