Hide song progress bar on multi-spectator player

This commit is contained in:
Salman Ahmed
2021-08-13 07:30:09 +03:00
parent e7cf6b2d23
commit 34c2b317e2
3 changed files with 14 additions and 2 deletions

View File

@ -35,6 +35,8 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
{ {
spectatorPlayerClock.WaitingOnFrames.BindTo(waitingOnFrames); spectatorPlayerClock.WaitingOnFrames.BindTo(waitingOnFrames);
AllowUserSeekingState.Value = false;
AllowUserSeekingState.Disabled = true;
HUDOverlay.PlayerSettingsOverlay.Expire(); HUDOverlay.PlayerSettingsOverlay.Expire();
HUDOverlay.HoldToQuit.Expire(); HUDOverlay.HoldToQuit.Expire();
} }

View File

@ -77,6 +77,10 @@ namespace osu.Game.Screens.Play
protected readonly Bindable<bool> LocalUserPlaying = new Bindable<bool>(); protected readonly Bindable<bool> LocalUserPlaying = new Bindable<bool>();
protected readonly Bindable<bool> AllowUserSeekingState = new Bindable<bool>();
public IBindable<bool> AllowUserSeeking => AllowUserSeekingState;
public int RestartCount; public int RestartCount;
[Resolved] [Resolved]
@ -269,7 +273,13 @@ namespace osu.Game.Screens.Play
DrawableRuleset.FrameStableClock.IsCatchingUp.BindValueChanged(_ => updateSampleDisabledState()); DrawableRuleset.FrameStableClock.IsCatchingUp.BindValueChanged(_ => updateSampleDisabledState());
DrawableRuleset.HasReplayLoaded.BindValueChanged(_ => updateGameplayState()); DrawableRuleset.HasReplayLoaded.BindValueChanged(r =>
{
if (!AllowUserSeekingState.Disabled)
AllowUserSeekingState.Value = r.NewValue;
updateGameplayState();
});
// bind clock into components that require it // bind clock into components that require it
DrawableRuleset.IsPaused.BindTo(GameplayClockContainer.IsPaused); DrawableRuleset.IsPaused.BindTo(GameplayClockContainer.IsPaused);

View File

@ -119,7 +119,7 @@ namespace osu.Game.Screens.Play
if (drawableRuleset != null) if (drawableRuleset != null)
{ {
AllowSeeking.BindTo(drawableRuleset.HasReplayLoaded); ((IBindable<bool>)AllowSeeking).BindTo(player.AllowUserSeeking);
referenceClock = drawableRuleset.FrameStableClock; referenceClock = drawableRuleset.FrameStableClock;
Objects = drawableRuleset.Objects; Objects = drawableRuleset.Objects;