From de2486b8e61481f518db0b7d1075b54f4209c261 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Mon, 8 May 2017 20:36:02 +0300 Subject: [PATCH] Moved timeLeft recalculation to property --- osu.Game/Screens/Play/SongProgressInfo.cs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/osu.Game/Screens/Play/SongProgressInfo.cs b/osu.Game/Screens/Play/SongProgressInfo.cs index 6719ddfb6b..d805dc2cbd 100644 --- a/osu.Game/Screens/Play/SongProgressInfo.cs +++ b/osu.Game/Screens/Play/SongProgressInfo.cs @@ -29,7 +29,10 @@ namespace osu.Game.Screens.Play { currentTime = value; if (value > 0) + { timeCurrent.Text = TimeSpan.FromMilliseconds(value).ToString(@"m\:ss"); + timeLeft.Text = @"-" + TimeSpan.FromMilliseconds(songLenght - value).ToString(@"m\:ss"); + } } } 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"); - } } }