1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 04:13:00 +08:00

Expose GetRankName from DrawableRank

This commit is contained in:
smoogipoo 2020-03-17 16:25:51 +09:00
parent d77b0acd90
commit e586249db7

View File

@ -59,7 +59,7 @@ namespace osu.Game.Online.Leaderboards
Padding = new MarginPadding { Top = 5 }, Padding = new MarginPadding { Top = 5 },
Colour = getRankNameColour(), Colour = getRankNameColour(),
Font = OsuFont.Numeric.With(size: 25), Font = OsuFont.Numeric.With(size: 25),
Text = getRankName(), Text = GetRankName(rank),
ShadowColour = Color4.Black.Opacity(0.3f), ShadowColour = Color4.Black.Opacity(0.3f),
ShadowOffset = new Vector2(0, 0.08f), ShadowOffset = new Vector2(0, 0.08f),
Shadow = true, Shadow = true,
@ -69,7 +69,7 @@ namespace osu.Game.Online.Leaderboards
}; };
} }
private string getRankName() => rank.GetDescription().TrimEnd('+'); public static string GetRankName(ScoreRank rank) => rank.GetDescription().TrimEnd('+');
/// <summary> /// <summary>
/// Retrieves the grade text colour. /// Retrieves the grade text colour.