From ed3956eca534f94f30bdccb9f9699f7ba0159e61 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 14 Apr 2017 20:09:01 +0900 Subject: [PATCH] Make comma separators optional. --- osu.Game/Graphics/UserInterface/ScoreCounter.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/ScoreCounter.cs b/osu.Game/Graphics/UserInterface/ScoreCounter.cs index b035dbb547..3e01b9e4f4 100644 --- a/osu.Game/Graphics/UserInterface/ScoreCounter.cs +++ b/osu.Game/Graphics/UserInterface/ScoreCounter.cs @@ -5,7 +5,6 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Transforms; using osu.Framework.MathUtils; using System; -using osu.Framework.Allocation; namespace osu.Game.Graphics.UserInterface { @@ -16,6 +15,8 @@ namespace osu.Game.Graphics.UserInterface protected override double RollingDuration => 1000; protected override EasingTypes RollingEasing => EasingTypes.Out; + public bool UseCommaSeparator; + /// /// How many leading zeroes the counter has. /// @@ -43,8 +44,9 @@ namespace osu.Game.Graphics.UserInterface protected override string FormatCount(double count) { string format = new string('0', (int)LeadingZeroes); - for (int i = format.Length - 3; i > 0; i -= 3) - format = format.Insert(i, @","); + if (UseCommaSeparator) + for (int i = format.Length - 3; i > 0; i -= 3) + format = format.Insert(i, @","); return ((long)count).ToString(format); }