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

Fix rank display on break info display

This commit is contained in:
Dean Herbert 2019-04-21 12:04:15 +08:00
parent 4e1a9e4228
commit 6f2bc943eb

View File

@ -1,8 +1,10 @@
// 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.
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)