1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 04:13:00 +08:00

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);
AllowUserSeekingState.Value = false;
AllowUserSeekingState.Disabled = true;
HUDOverlay.PlayerSettingsOverlay.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> AllowUserSeekingState = new Bindable<bool>();
public IBindable<bool> AllowUserSeeking => AllowUserSeekingState;
public int RestartCount;
[Resolved]
@ -269,7 +273,13 @@ namespace osu.Game.Screens.Play
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
DrawableRuleset.IsPaused.BindTo(GameplayClockContainer.IsPaused);

View File

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