mirror of
https://github.com/ppy/osu.git
synced 2024-11-15 06:37:43 +08:00
39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
using osu.Framework.Graphics;
|
|
using osu.Game.Graphics.Sprites;
|
|
using System;
|
|
|
|
namespace osu.Game.Screens.Edit.Components
|
|
{
|
|
public class TimeInfoContainer : BottomBarContainer
|
|
{
|
|
private const int count_duration = 150;
|
|
|
|
private readonly OsuSpriteText trackTimer;
|
|
|
|
public TimeInfoContainer()
|
|
{
|
|
Children = new Drawable[]
|
|
{
|
|
trackTimer = new OsuSpriteText
|
|
{
|
|
Origin = Anchor.BottomLeft,
|
|
RelativePositionAxes = Axes.Y,
|
|
TextSize = 22,
|
|
FixedWidth = true,
|
|
Y = 0.5f,
|
|
}
|
|
};
|
|
}
|
|
|
|
protected override void Update()
|
|
{
|
|
base.Update();
|
|
|
|
trackTimer.Text = TimeSpan.FromMilliseconds(Track.CurrentTime).ToString(@"mm\:ss\:fff");
|
|
}
|
|
}
|
|
}
|