1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 20:22:55 +08:00

Show playing progress.

This commit is contained in:
Huo Yaoyuan 2016-10-24 17:23:30 +08:00
parent 1a3a5c544d
commit 8e766a1f47

View File

@ -163,7 +163,7 @@ namespace osu.Game.Overlays
{
RelativeSizeAxes = Axes.X,
Height = 10,
Width = 0.5f,//placeholder
Width = 0,
Origin = Anchor.BottomLeft,
Anchor = Anchor.BottomLeft,
Colour = Color4.Orange
@ -176,6 +176,14 @@ namespace osu.Game.Overlays
}
}
protected override void Update()
{
base.Update();
if (currentTrack == null) return;
progress.Width = (float)(currentTrack.CurrentTime / currentTrack.Length);
if (currentTrack.HasCompleted) next();
}
private void prev()
{
int i = playList.IndexOf(currentPlay);