mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Moved timeLeft recalculation to property
This commit is contained in:
parent
17d1ecb8f5
commit
de2486b8e6
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user