1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 18:53:51 +08:00
osu-lazer/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 17:19:50 +08:00
2022-06-17 15:37:17 +08:00
#nullable disable
2017-09-21 03:33:07 +08:00
using System;
using osu.Framework.Graphics;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
2018-04-13 17:19:50 +08:00
namespace osu.Game.Screens.Play.Break
2017-09-21 03:33:07 +08:00
{
public partial class RemainingTimeCounter : Counter
2017-09-21 03:33:07 +08:00
{
private readonly OsuSpriteText counter;
2018-04-13 17:19:50 +08:00
2017-09-21 03:33:07 +08:00
public RemainingTimeCounter()
{
AutoSizeAxes = Axes.Both;
InternalChild = counter = new OsuSpriteText
2017-09-21 03:33:07 +08:00
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Font = OsuFont.Numeric.With(size: 33),
2017-09-21 03:33:07 +08:00
};
}
2018-04-13 17:19:50 +08:00
protected override void OnCountChanged(double count) => counter.Text = ((int)Math.Ceiling(count / 1000)).ToString();
2017-09-21 03:33:07 +08:00
}
}