mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 01:37:46 +08:00
code fixes
This commit is contained in:
parent
c3a42ded36
commit
dda25219bc
@ -140,7 +140,7 @@ namespace osu.Game.Screens.Play
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
double currentTime = (AudioClock?.CurrentTime ?? Time.Current) - firstHitTime;
|
double currentTime = (AudioClock?.CurrentTime ?? Time.Current) - firstHitTime;
|
||||||
double progress = currentTime / (lastHitTime-firstHitTime);
|
double progress = currentTime / (lastHitTime - firstHitTime);
|
||||||
|
|
||||||
bar.UpdatePosition((float)progress);
|
bar.UpdatePosition((float)progress);
|
||||||
graph.Progress = (int)(graph.ColumnCount * progress);
|
graph.Progress = (int)(graph.ColumnCount * progress);
|
||||||
|
@ -32,16 +32,7 @@ namespace osu.Game.Screens.Play
|
|||||||
timeCurrentText.Text = TimeSpan.FromMilliseconds(value).ToString(@"m\:ss");
|
timeCurrentText.Text = TimeSpan.FromMilliseconds(value).ToString(@"m\:ss");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public double TimeLeft
|
public double TimeLeft { set { timeLeft.Text = @"-" + TimeSpan.FromMilliseconds((timeCurrent < 0) ? (value + timeCurrent) : value).ToString(@"m\:ss"); } }
|
||||||
{
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if(timeCurrent < 0)
|
|
||||||
timeLeft.Text = @"-" + TimeSpan.FromMilliseconds(value + timeCurrent).ToString(@"m\:ss");
|
|
||||||
else
|
|
||||||
timeLeft.Text = @"-" + TimeSpan.FromMilliseconds(value).ToString(@"m\:ss");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public int Progress
|
public int Progress
|
||||||
{
|
{
|
||||||
set
|
set
|
||||||
|
Loading…
x
Reference in New Issue
Block a user