1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:07:44 +08:00

Leading zeroes now part of ScoreCounter ctor

This commit is contained in:
Adonais Romero González 2016-10-12 20:57:06 -05:00
parent 73e4359e9d
commit 71d7de5326
2 changed files with 15 additions and 7 deletions

View File

@ -25,7 +25,7 @@ namespace osu.Desktop.Tests
{
base.Reset();
ScoreCounter uc = new ScoreCounter
ScoreCounter uc = new ScoreCounter(7)
{
Origin = Anchor.TopRight,
Anchor = Anchor.TopRight,
@ -34,7 +34,6 @@ namespace osu.Desktop.Tests
RollingEasing = EasingTypes.Out,
Count = 0,
Position = new Vector2(20, 20),
LeadingZeroes = 7,
};
Add(uc);

View File

@ -13,13 +13,22 @@ namespace osu.Game.Graphics.UserInterface
public class ScoreCounter : ULongCounter
{
/// <summary>
/// How many leading zeroes the counter will have.
/// How many leading zeroes the counter has.
/// </summary>
public uint LeadingZeroes = 0;
public ScoreCounter() : base()
public uint LeadingZeroes
{
countSpriteText.FixedWidth = true;
get;
protected set;
}
/// <summary>
/// Displays score.
/// </summary>
/// <param name="leading">How many leading zeroes the counter will have.</param>
public ScoreCounter(uint leading = 0) : base()
{
countSpriteText.FixedWidth = true;
LeadingZeroes = leading;
}
public override void Load(BaseGame game)