mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 05:02:55 +08:00
Fix display being incorrect when MaxValue is not 1
This commit is contained in:
parent
894642d588
commit
cfc4eaff59
@ -174,12 +174,10 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
double floatValue = value.ToDouble(NumberFormatInfo.InvariantInfo);
|
double floatValue = value.ToDouble(NumberFormatInfo.InvariantInfo);
|
||||||
double floatMaxValue = CurrentNumber.MaxValue.ToDouble(NumberFormatInfo.InvariantInfo);
|
|
||||||
|
|
||||||
if (DisplayAsPercentage)
|
if (DisplayAsPercentage)
|
||||||
{
|
{
|
||||||
double percentage = floatValue / floatMaxValue;
|
TooltipText = floatValue.ToString("P0");
|
||||||
TooltipText = percentage.ToString("P0");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user