diff --git a/osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs b/osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs index e208be6095..e2859868bd 100644 --- a/osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs +++ b/osu.Game/Screens/Play/PlayerSettings/PlaybackSettings.cs @@ -27,6 +27,8 @@ namespace osu.Game.Screens.Play.PlayerSettings Precision = 0.1, }; + public readonly Bindable AllowControls = new BindableBool(true); + private readonly PlayerSliderBar rateSlider; private readonly OsuSpriteText multiplierText; @@ -71,6 +73,7 @@ namespace osu.Game.Screens.Play.PlayerSettings Origin = Anchor.Centre, Icon = FontAwesome.Solid.FastBackward, Action = () => seek(-1, seek_fast_amount), + Enabled = { BindTarget = AllowControls }, }, new SeekButton { @@ -78,6 +81,7 @@ namespace osu.Game.Screens.Play.PlayerSettings Origin = Anchor.Centre, Icon = FontAwesome.Solid.Backward, Action = () => seek(-1, seek_amount), + Enabled = { BindTarget = AllowControls }, }, play = new IconButton { @@ -95,7 +99,8 @@ namespace osu.Game.Screens.Play.PlayerSettings else gameplayClock.Start(); } - } + }, + Enabled = { BindTarget = AllowControls }, }, new SeekButton { @@ -103,6 +108,7 @@ namespace osu.Game.Screens.Play.PlayerSettings Origin = Anchor.Centre, Icon = FontAwesome.Solid.Forward, Action = () => seek(1, seek_amount), + Enabled = { BindTarget = AllowControls }, }, new SeekButton { @@ -110,6 +116,7 @@ namespace osu.Game.Screens.Play.PlayerSettings Origin = Anchor.Centre, Icon = FontAwesome.Solid.FastForward, Action = () => seek(1, seek_fast_amount), + Enabled = { BindTarget = AllowControls }, }, }, }, @@ -150,7 +157,9 @@ namespace osu.Game.Screens.Play.PlayerSettings { base.LoadComplete(); rateSlider.Current.BindValueChanged(multiplier => multiplierText.Text = $"{multiplier.NewValue:0.0}x", true); - gameplayClock?.IsPaused.BindTo(isPaused); + + if (gameplayClock != null) + isPaused.BindTarget = gameplayClock.IsPaused; } private partial class SeekButton : IconButton diff --git a/osu.Game/Screens/Play/SpectatorPlayer.cs b/osu.Game/Screens/Play/SpectatorPlayer.cs index 2faead0ee1..dd7418d563 100644 --- a/osu.Game/Screens/Play/SpectatorPlayer.cs +++ b/osu.Game/Screens/Play/SpectatorPlayer.cs @@ -68,6 +68,8 @@ namespace osu.Game.Screens.Play master.UserPlaybackRate.Value = 1; } }, true); + + HUDOverlay.PlayerSettingsOverlay.PlaybackSettings.AllowControls.Value = false; } ///