2018-01-05 19:21:19 +08:00
|
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-11-17 17:26:13 +08:00
|
|
|
|
// 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;
|
|
|
|
|
|
2017-11-17 17:26:13 +08:00
|
|
|
|
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
|
|
|
|
}
|
2017-11-17 17:26:13 +08:00
|
|
|
|
}
|
|
|
|
|
}
|