osu/osu.Game/Screens/Play/Break/RemainingTimeCounter.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
920 B
C#
Raw Normal View History

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
2018-04-13 09:19:50 +00:00
2022-06-17 07:37:17 +00:00
#nullable disable
2017-09-20 19:33:07 +00:00
using System;
using osu.Framework.Graphics;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
2018-04-13 09:19:50 +00:00
namespace osu.Game.Screens.Play.Break
2017-09-20 19:33:07 +00:00
{
2022-11-24 05:32:20 +00:00
public partial class RemainingTimeCounter : Counter
2017-09-20 19:33:07 +00:00
{
private readonly OsuSpriteText counter;
2018-04-13 09:19:50 +00:00
2017-09-20 19:33:07 +00:00
public RemainingTimeCounter()
{
AutoSizeAxes = Axes.Both;
InternalChild = counter = new OsuSpriteText
2017-09-20 19:33:07 +00:00
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Font = OsuFont.Numeric.With(size: 33),
2017-09-20 19:33:07 +00:00
};
}
2018-04-13 09:19:50 +00:00
protected override void OnCountChanged(double count) => counter.Text = ((int)Math.Ceiling(count / 1000)).ToString();
2017-09-20 19:33:07 +00:00
}
}