mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Leading zeroes now part of ScoreCounter ctor
This commit is contained in:
@ -25,7 +25,7 @@ namespace osu.Desktop.Tests
|
|||||||
{
|
{
|
||||||
base.Reset();
|
base.Reset();
|
||||||
|
|
||||||
ScoreCounter uc = new ScoreCounter
|
ScoreCounter uc = new ScoreCounter(7)
|
||||||
{
|
{
|
||||||
Origin = Anchor.TopRight,
|
Origin = Anchor.TopRight,
|
||||||
Anchor = Anchor.TopRight,
|
Anchor = Anchor.TopRight,
|
||||||
@ -34,7 +34,6 @@ namespace osu.Desktop.Tests
|
|||||||
RollingEasing = EasingTypes.Out,
|
RollingEasing = EasingTypes.Out,
|
||||||
Count = 0,
|
Count = 0,
|
||||||
Position = new Vector2(20, 20),
|
Position = new Vector2(20, 20),
|
||||||
LeadingZeroes = 7,
|
|
||||||
};
|
};
|
||||||
Add(uc);
|
Add(uc);
|
||||||
|
|
||||||
|
@ -13,13 +13,22 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
public class ScoreCounter : ULongCounter
|
public class ScoreCounter : ULongCounter
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// How many leading zeroes the counter will have.
|
/// How many leading zeroes the counter has.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public uint LeadingZeroes = 0;
|
public uint LeadingZeroes
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
protected set;
|
||||||
|
}
|
||||||
|
|
||||||
public ScoreCounter() : base()
|
/// <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;
|
countSpriteText.FixedWidth = true;
|
||||||
|
LeadingZeroes = leading;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Load(BaseGame game)
|
public override void Load(BaseGame game)
|
||||||
|
Reference in New Issue
Block a user