mirror of
https://github.com/ppy/osu
synced 2025-01-09 23:59:44 +00:00
Stop progress as soon as we at 100%
This commit is contained in:
parent
5b469eff69
commit
d55c97a08a
@ -145,8 +145,11 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
double progress = ((audioClock?.CurrentTime ?? Time.Current) - firstHitTime) / (lastHitTime - firstHitTime);
|
||||
|
||||
if((int)progress * 100 < 100)
|
||||
{
|
||||
bar.UpdatePosition((float)progress);
|
||||
graph.Progress = (int)(graph.ColumnCount * progress);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -75,6 +75,8 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
double songCurrentTime = AudioClock.CurrentTime - startTime;
|
||||
|
||||
if(songCurrentTime < endTime - startTime)
|
||||
{
|
||||
int currentSecond = TimeSpan.FromMilliseconds(songCurrentTime).Seconds;
|
||||
|
||||
if (currentSecond != previousSecond || previousTimespan < 0 && songCurrentTime > 0)
|
||||
@ -90,7 +92,7 @@ namespace osu.Game.Screens.Play
|
||||
timeLeft.Text = @"-" + TimeSpan.FromMilliseconds(endTime - AudioClock.CurrentTime).ToString(@"m\:ss");
|
||||
}
|
||||
|
||||
int currentPercent = (int)(songCurrentTime / (endTime - startTime) * 100);
|
||||
int currentPercent = (int)(songCurrentTime / (endTime - startTime) * 100) + 1;
|
||||
|
||||
if (currentPercent != previousPercent)
|
||||
{
|
||||
@ -101,3 +103,4 @@ namespace osu.Game.Screens.Play
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user