1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 21:27:24 +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 },
Colour = getRankNameColour(),
Font = OsuFont.Numeric.With(size: 25),
Text = getRankName(),
Text = GetRankName(rank),
ShadowColour = Color4.Black.Opacity(0.3f),
ShadowOffset = new Vector2(0, 0.08f),
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>
/// Retrieves the grade text colour.