mirror of
https://github.com/ppy/osu.git
synced 2025-01-21 08:52:54 +08:00
Merge pull request #4653 from peppy/fix-rank-display
Fix rank display on break info display
This commit is contained in:
commit
9f52b3b490
@ -43,7 +43,24 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
|
|
||||||
private void updateTexture()
|
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)
|
public void UpdateRank(ScoreRank newRank)
|
||||||
|
@ -25,13 +25,13 @@ namespace osu.Game.Scoring
|
|||||||
[Description(@"S")]
|
[Description(@"S")]
|
||||||
S,
|
S,
|
||||||
|
|
||||||
[Description(@"SPlus")]
|
[Description(@"S+")]
|
||||||
SH,
|
SH,
|
||||||
|
|
||||||
[Description(@"SS")]
|
[Description(@"SS")]
|
||||||
X,
|
X,
|
||||||
|
|
||||||
[Description(@"SSPlus")]
|
[Description(@"SS+")]
|
||||||
XH,
|
XH,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Framework.Extensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
@ -60,7 +62,13 @@ namespace osu.Game.Screens.Play.Break
|
|||||||
valueText.Text = newText;
|
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]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
|
Loading…
Reference in New Issue
Block a user