1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 09:47:24 +08:00
osu-lazer/osu.Game/Screens/Edit/Components/TimeInfoContainer.cs

39 lines
1.1 KiB
C#
Raw Normal View History

2018-01-05 19:21:19 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2017-11-18 13:24:09 +08:00
using osu.Framework.Graphics;
using osu.Game.Graphics.Sprites;
using System;
namespace osu.Game.Screens.Edit.Components
{
public class TimeInfoContainer : BottomBarContainer
{
2017-11-18 13:24:09 +08:00
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();
2017-11-21 17:22:19 +08:00
trackTimer.Text = TimeSpan.FromMilliseconds(Track.CurrentTime).ToString(@"mm\:ss\:fff");
2017-11-18 13:24:09 +08:00
}
}
}