mirror of
https://github.com/osukey/osukey.git
synced 2025-06-08 04:48:04 +09:00
Make comma separators optional.
This commit is contained in:
parent
ac3b435f00
commit
ed3956eca5
@ -5,7 +5,6 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Transforms;
|
using osu.Framework.Graphics.Transforms;
|
||||||
using osu.Framework.MathUtils;
|
using osu.Framework.MathUtils;
|
||||||
using System;
|
using System;
|
||||||
using osu.Framework.Allocation;
|
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface
|
namespace osu.Game.Graphics.UserInterface
|
||||||
{
|
{
|
||||||
@ -16,6 +15,8 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
protected override double RollingDuration => 1000;
|
protected override double RollingDuration => 1000;
|
||||||
protected override EasingTypes RollingEasing => EasingTypes.Out;
|
protected override EasingTypes RollingEasing => EasingTypes.Out;
|
||||||
|
|
||||||
|
public bool UseCommaSeparator;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// How many leading zeroes the counter has.
|
/// How many leading zeroes the counter has.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -43,6 +44,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
protected override string FormatCount(double count)
|
protected override string FormatCount(double count)
|
||||||
{
|
{
|
||||||
string format = new string('0', (int)LeadingZeroes);
|
string format = new string('0', (int)LeadingZeroes);
|
||||||
|
if (UseCommaSeparator)
|
||||||
for (int i = format.Length - 3; i > 0; i -= 3)
|
for (int i = format.Length - 3; i > 0; i -= 3)
|
||||||
format = format.Insert(i, @",");
|
format = format.Insert(i, @",");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user