mirror of
https://github.com/ppy/osu
synced 2025-01-18 20:10:49 +00:00
Merge pull request #3671 from gotopie/hide-seekbar-with-no-song
Hide seekbar when no song is playing
This commit is contained in:
commit
059f1d9bcb
@ -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?.IsDummyDevice == false)
|
||||
{
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user