1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 09:07:25 +08:00

Moved timeLeft recalculation to property

This commit is contained in:
EVAST9919 2017-05-08 20:36:02 +03:00
parent 17d1ecb8f5
commit de2486b8e6

View File

@ -29,7 +29,10 @@ namespace osu.Game.Screens.Play
{ {
currentTime = value; currentTime = value;
if (value > 0) if (value > 0)
{
timeCurrent.Text = TimeSpan.FromMilliseconds(value).ToString(@"m\:ss"); timeCurrent.Text = TimeSpan.FromMilliseconds(value).ToString(@"m\:ss");
timeLeft.Text = @"-" + TimeSpan.FromMilliseconds(songLenght - value).ToString(@"m\:ss");
}
} }
} }
public float Progress public float Progress
@ -80,13 +83,5 @@ namespace osu.Game.Screens.Play
} }
}; };
} }
protected override void Update()
{
base.Update();
if(currentTime > 0)
timeLeft.Text = @"-" + TimeSpan.FromMilliseconds(songLenght - currentTime).ToString(@"m\:ss");
}
} }
} }