1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 23:07:26 +08:00
osu-lazer/osu.Game/Screens/Play/Break/RemainingTimeCounter.cs

30 lines
907 B
C#
Raw Normal View History

2018-01-05 19:21:19 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
2017-09-21 03:33:07 +08:00
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Framework.Graphics;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics.Sprites;
2017-09-21 03:33:07 +08:00
namespace osu.Game.Screens.Play.Break
2017-09-21 03:33:07 +08:00
{
public class RemainingTimeCounter : Counter
2017-09-21 03:33:07 +08:00
{
private readonly OsuSpriteText counter;
public RemainingTimeCounter()
{
AutoSizeAxes = Axes.Both;
InternalChild = counter = new OsuSpriteText
2017-09-21 03:33:07 +08:00
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
TextSize = 33,
Font = "Venera",
};
}
protected override void OnCountChanged(double count) => counter.Text = ((int)Math.Ceiling(count / 1000)).ToString();
2017-09-21 03:33:07 +08:00
}
}