From dda25219bc07efba77c22e02856536d471ff976e Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Mon, 8 May 2017 01:54:31 +0300 Subject: [PATCH] code fixes --- osu.Game/Screens/Play/SongProgress.cs | 2 +- osu.Game/Screens/Play/SongProgressInfo.cs | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/osu.Game/Screens/Play/SongProgress.cs b/osu.Game/Screens/Play/SongProgress.cs index 737c65397c..020a26f703 100644 --- a/osu.Game/Screens/Play/SongProgress.cs +++ b/osu.Game/Screens/Play/SongProgress.cs @@ -140,7 +140,7 @@ namespace osu.Game.Screens.Play return; double currentTime = (AudioClock?.CurrentTime ?? Time.Current) - firstHitTime; - double progress = currentTime / (lastHitTime-firstHitTime); + double progress = currentTime / (lastHitTime - firstHitTime); bar.UpdatePosition((float)progress); graph.Progress = (int)(graph.ColumnCount * progress); diff --git a/osu.Game/Screens/Play/SongProgressInfo.cs b/osu.Game/Screens/Play/SongProgressInfo.cs index 17623ca9f7..d2b236035d 100644 --- a/osu.Game/Screens/Play/SongProgressInfo.cs +++ b/osu.Game/Screens/Play/SongProgressInfo.cs @@ -32,16 +32,7 @@ namespace osu.Game.Screens.Play timeCurrentText.Text = TimeSpan.FromMilliseconds(value).ToString(@"m\:ss"); } } - public double TimeLeft - { - set - { - if(timeCurrent < 0) - timeLeft.Text = @"-" + TimeSpan.FromMilliseconds(value + timeCurrent).ToString(@"m\:ss"); - else - timeLeft.Text = @"-" + TimeSpan.FromMilliseconds(value).ToString(@"m\:ss"); - } - } + public double TimeLeft { set { timeLeft.Text = @"-" + TimeSpan.FromMilliseconds((timeCurrent < 0) ? (value + timeCurrent) : value).ToString(@"m\:ss"); } } public int Progress { set