mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Localise accuracy display.
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Utils;
|
||||
|
||||
@ -27,7 +28,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Current.Value = DisplayedCount = 1.0f;
|
||||
}
|
||||
|
||||
protected override string FormatCount(double count) => count.FormatAccuracy();
|
||||
protected override LocalisableString FormatCount(double count) => count.FormatAccuracy();
|
||||
|
||||
protected override double GetProportionalDuration(double currentValue, double newValue)
|
||||
{
|
||||
|
@ -10,6 +10,7 @@ using System.Collections.Generic;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Localisation;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
@ -137,8 +138,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
/// Used to format counts.
|
||||
/// </summary>
|
||||
/// <param name="count">Count to format.</param>
|
||||
/// <returns>Count formatted as a string.</returns>
|
||||
protected virtual string FormatCount(T count)
|
||||
/// <returns>Count formatted as a localisable string.</returns>
|
||||
protected virtual LocalisableString FormatCount(T count)
|
||||
{
|
||||
return count.ToString();
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterface
|
||||
@ -37,7 +38,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
return currentValue > newValue ? currentValue - newValue : newValue - currentValue;
|
||||
}
|
||||
|
||||
protected override string FormatCount(double count)
|
||||
protected override LocalisableString FormatCount(double count)
|
||||
{
|
||||
string format = new string('0', RequiredDisplayDigits.Value);
|
||||
|
||||
|
Reference in New Issue
Block a user