2016-10-07 07:24:46 +00:00
|
|
|
|
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
2016-10-12 07:11:40 +00:00
|
|
|
|
using osu.Framework;
|
2016-10-07 07:24:46 +00:00
|
|
|
|
using System;
|
2016-10-07 07:05:02 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Graphics.UserInterface
|
|
|
|
|
{
|
|
|
|
|
public class ScoreCounter : ULongCounter
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How many leading zeroes the counter will have.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public uint LeadingZeroes = 0;
|
|
|
|
|
|
2016-10-12 19:33:04 +00:00
|
|
|
|
public ScoreCounter() : base()
|
|
|
|
|
{
|
|
|
|
|
countSpriteText.FixedWidth = true;
|
|
|
|
|
}
|
|
|
|
|
|
2016-10-12 07:11:40 +00:00
|
|
|
|
public override void Load(BaseGame game)
|
2016-10-09 02:58:53 +00:00
|
|
|
|
{
|
2016-10-12 07:11:40 +00:00
|
|
|
|
base.Load(game);
|
2016-10-09 02:58:53 +00:00
|
|
|
|
}
|
|
|
|
|
|
2016-10-07 07:05:02 +00:00
|
|
|
|
protected override string formatCount(ulong count)
|
|
|
|
|
{
|
|
|
|
|
return count.ToString("D" + LeadingZeroes);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|