1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

hide seekbar when no song is playing

This commit is contained in:
gotopie 2018-11-02 19:04:30 -04:00
parent 54fede4559
commit 4c9dcdf156

View File

@ -245,10 +245,10 @@ namespace osu.Game.Overlays
{
base.Update();
if (current?.TrackLoaded ?? false)
{
var track = current.Track;
var track = (current?.TrackLoaded ?? false) ? current.Track : null;
if (track != null && !track.IsDummyDevice)
{
progressBar.EndTime = track.Length;
progressBar.CurrentTime = track.CurrentTime;
@ -258,7 +258,11 @@ namespace osu.Game.Overlays
next();
}
else
{
progressBar.CurrentTime = 0;
progressBar.EndTime = 1;
playButton.Icon = FontAwesome.fa_play_circle_o;
}
}
private void play()