From 21af9da94f983cd864f6ef63f8cea168405b51cb Mon Sep 17 00:00:00 2001 From: Nqtural Date: Thu, 23 Jul 2026 23:17:37 +0200 Subject: [PATCH 1/6] feat: Option to display leaderboard in multiplayer Add option to display gameplay leaderboard in multiplayer lobbies only. --- .../GameplayLeaderboardVisibilityMode.cs | 20 +++++++++++++++++++ ...playLeaderboardVisibilityModeExtensions.cs | 19 ++++++++++++++++++ osu.Game/Configuration/OsuConfigManager.cs | 11 +++++----- .../Localisation/GameplaySettingsStrings.cs | 19 ++++++++++++++++-- .../Settings/Sections/Gameplay/HUDSettings.cs | 6 +++--- .../Multiplayer/MultiplayerPositionDisplay.cs | 8 ++++---- .../Play/HUD/DrawableGameplayLeaderboard.cs | 7 ++++--- osu.Game/Screens/Play/HUDOverlay.cs | 17 +++++++++++++--- 8 files changed, 87 insertions(+), 20 deletions(-) create mode 100644 osu.Game/Configuration/GameplayLeaderboardVisibilityMode.cs create mode 100644 osu.Game/Configuration/GameplayLeaderboardVisibilityModeExtensions.cs diff --git a/osu.Game/Configuration/GameplayLeaderboardVisibilityMode.cs b/osu.Game/Configuration/GameplayLeaderboardVisibilityMode.cs new file mode 100644 index 000000000000..c37c276b72df --- /dev/null +++ b/osu.Game/Configuration/GameplayLeaderboardVisibilityMode.cs @@ -0,0 +1,20 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using osu.Framework.Localisation; +using osu.Game.Localisation; + +namespace osu.Game.Configuration +{ + public enum GameplayLeaderboardVisibilityMode + { + [LocalisableDescription(typeof(GameplaySettingsStrings), nameof(GameplaySettingsStrings.ShowLeaderboardAlways))] + Always, + + [LocalisableDescription(typeof(GameplaySettingsStrings), nameof(GameplaySettingsStrings.ShowLeaderboardMultiplayer))] + Multiplayer, + + [LocalisableDescription(typeof(GameplaySettingsStrings), nameof(GameplaySettingsStrings.ShowLeaderboardNever))] + Never, + } +} diff --git a/osu.Game/Configuration/GameplayLeaderboardVisibilityModeExtensions.cs b/osu.Game/Configuration/GameplayLeaderboardVisibilityModeExtensions.cs new file mode 100644 index 000000000000..254612c3b9fd --- /dev/null +++ b/osu.Game/Configuration/GameplayLeaderboardVisibilityModeExtensions.cs @@ -0,0 +1,19 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +namespace osu.Game.Configuration +{ + public static class GameplayLeaderboardVisibilityModeExtensions + { + public static bool ShouldDisplay(this GameplayLeaderboardVisibilityMode mode, bool isMultiplayer) + { + return mode switch + { + GameplayLeaderboardVisibilityMode.Never => false, + GameplayLeaderboardVisibilityMode.Multiplayer => isMultiplayer, + GameplayLeaderboardVisibilityMode.Always => true, + _ => false, + }; + } + } +} diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index 47ea527afeba..e866a1ba0e61 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -152,7 +152,7 @@ protected override void InitialiseDefaults() SetDefault(OsuSetting.KeyOverlay, false); SetDefault(OsuSetting.ReplaySettingsOverlay, true); SetDefault(OsuSetting.ReplayPlaybackControlsExpanded, true); - SetDefault(OsuSetting.GameplayLeaderboard, true); + SetDefault(OsuSetting.GameplayLeaderboardVisibilityMode, GameplayLeaderboardVisibilityMode.Always); SetDefault(OsuSetting.AlwaysPlayFirstComboBreak, true); SetDefault(OsuSetting.FloatingComments, false); @@ -267,10 +267,10 @@ public override TrackedSettings CreateTrackedSettings() value: disabledState ? CommonStrings.Disabled.ToLower() : CommonStrings.Enabled.ToLower(), shortcut: LookupKeyBindings(GlobalAction.ToggleGameplayMouseButtons)) ), - new TrackedSetting(OsuSetting.GameplayLeaderboard, state => new SettingDescription( - rawValue: state, + new TrackedSetting(OsuSetting.GameplayLeaderboardVisibilityMode, visibilityMode => new SettingDescription( + rawValue: visibilityMode, name: GlobalActionKeyBindingStrings.ToggleInGameLeaderboard, - value: state ? CommonStrings.Enabled.ToLower() : CommonStrings.Disabled.ToLower(), + value: visibilityMode.GetLocalisableDescription(), shortcut: LookupKeyBindings(GlobalAction.ToggleInGameLeaderboard)) ), new TrackedSetting(OsuSetting.HUDVisibilityMode, visibilityMode => new SettingDescription( @@ -338,7 +338,8 @@ public enum OsuSetting LightenDuringBreaks, ShowStoryboard, KeyOverlay, - GameplayLeaderboard, + GameplayLeaderboard, // only used for migrating to `GameplayLeaderboardVisibilityMode` + GameplayLeaderboardVisibilityMode, PositionalHitsoundsLevel, AlwaysPlayFirstComboBreak, FloatingComments, diff --git a/osu.Game/Localisation/GameplaySettingsStrings.cs b/osu.Game/Localisation/GameplaySettingsStrings.cs index 6c4ccfb5728b..2aa5ea72f35f 100644 --- a/osu.Game/Localisation/GameplaySettingsStrings.cs +++ b/osu.Game/Localisation/GameplaySettingsStrings.cs @@ -85,9 +85,24 @@ public static class GameplaySettingsStrings public static LocalisableString AlwaysShowKeyOverlay => new TranslatableString(getKey(@"key_overlay"), @"Always show key overlay"); /// - /// "Always show gameplay leaderboard" + /// "Gameplay leaderboard visibility mode" /// - public static LocalisableString AlwaysShowGameplayLeaderboard => new TranslatableString(getKey(@"gameplay_leaderboard"), @"Always show gameplay leaderboard"); + public static LocalisableString GameplayLeaderboardVisibilityMode => new TranslatableString(getKey(@"gameplay_leaderboard_visibility_mode"), @"Gameplay leaderboard visibility mode"); + + /// + /// "Always" + /// + public static LocalisableString ShowLeaderboardAlways => new TranslatableString(getKey(@"show_leaderboard_always"), @"Always"); + + /// + /// "Multiplayer" + /// + public static LocalisableString ShowLeaderboardMultiplayer => new TranslatableString(getKey(@"show_leaderboard_multiplayer"), @"Multiplayer"); + + /// + /// "Disabled" + /// + public static LocalisableString ShowLeaderboardNever => new TranslatableString(getKey(@"show_leaderboard_never"), @"Disabled"); /// /// "Always show hold for menu button" diff --git a/osu.Game/Overlays/Settings/Sections/Gameplay/HUDSettings.cs b/osu.Game/Overlays/Settings/Sections/Gameplay/HUDSettings.cs index 711e10da47ae..3c3b7ea645d4 100644 --- a/osu.Game/Overlays/Settings/Sections/Gameplay/HUDSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Gameplay/HUDSettings.cs @@ -41,10 +41,10 @@ private void load(OsuConfigManager config) { Keywords = new[] { "counter" }, }, - new SettingsItemV2(new FormCheckBox + new SettingsItemV2(new FormEnumDropdown { - Caption = GameplaySettingsStrings.AlwaysShowGameplayLeaderboard, - Current = config.GetBindable(OsuSetting.GameplayLeaderboard), + Caption = GameplaySettingsStrings.GameplayLeaderboardVisibilityMode, + Current = config.GetBindable(OsuSetting.GameplayLeaderboardVisibilityMode) }), new SettingsItemV2(new FormCheckBox { diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerPositionDisplay.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerPositionDisplay.cs index f2cbc41d16a9..fa941b1b2ad3 100644 --- a/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerPositionDisplay.cs +++ b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerPositionDisplay.cs @@ -28,7 +28,7 @@ public partial class MultiplayerPositionDisplay : VisibilityContainer { private readonly IBindable user = new Bindable(); private readonly IBindableList scores = new BindableList(); - private readonly BindableBool showLeaderboard = new BindableBool(); + private readonly Bindable leaderboardVisibility = new(); private readonly IBindable localUserPlayingState = new Bindable(); private readonly Bindable position = new Bindable(); @@ -52,7 +52,7 @@ private void load(IGameplayLeaderboardProvider leaderboardProvider, IAPIProvider { scores.BindTo(leaderboardProvider.Scores); user.BindTo(api.LocalUser); - configManager.BindWith(OsuSetting.GameplayLeaderboard, showLeaderboard); + configManager.BindWith(OsuSetting.GameplayLeaderboardVisibilityMode, leaderboardVisibility); localUserPlayingState.BindTo(gameplayState.PlayingState); AutoSizeAxes = Axes.Y; @@ -105,7 +105,7 @@ protected override void LoadComplete() user.BindValueChanged(_ => updateScoreBindings()); scores.BindCollectionChanged((_, __) => updateScoreBindings(), true); - showLeaderboard.BindValueChanged(_ => updateVisibility()); + leaderboardVisibility.BindValueChanged(_ => updateVisibility()); localUserPlayingState.BindValueChanged(_ => updateVisibility(), true); State.BindValueChanged(_ => updatePosition()); @@ -126,7 +126,7 @@ protected override void PopOut() private void updateVisibility() { - bool shouldDisplay = userScore != null && (showLeaderboard.Value || localUserPlayingState.Value == LocalUserPlayingState.Break); + bool shouldDisplay = userScore != null && (leaderboardVisibility.Value.ShouldDisplay(true) || localUserPlayingState.Value == LocalUserPlayingState.Break); State.Value = shouldDisplay ? Visibility.Visible : Visibility.Hidden; } diff --git a/osu.Game/Screens/Play/HUD/DrawableGameplayLeaderboard.cs b/osu.Game/Screens/Play/HUD/DrawableGameplayLeaderboard.cs index cd3ee730187e..02c10ce56b11 100644 --- a/osu.Game/Screens/Play/HUD/DrawableGameplayLeaderboard.cs +++ b/osu.Game/Screens/Play/HUD/DrawableGameplayLeaderboard.cs @@ -42,7 +42,7 @@ public partial class DrawableGameplayLeaderboard : CompositeDrawable, ISerialisa private IGameplayLeaderboardProvider leaderboardProvider { get; set; } = null!; private readonly IBindableList scores = new BindableList(); - private readonly Bindable configVisibility = new Bindable(); + private readonly Bindable configVisibility = new Bindable(); private readonly IBindable userPlayingState = new Bindable(); private readonly IBindable holdingForHUD = new Bindable(); @@ -81,7 +81,7 @@ public DrawableGameplayLeaderboard() [BackgroundDependencyLoader] private void load(OsuConfigManager config, GameplayState? gameplayState, HUDOverlay? hudOverlay) { - config.BindWith(OsuSetting.GameplayLeaderboard, configVisibility); + config.BindWith(OsuSetting.GameplayLeaderboardVisibilityMode, configVisibility); if (gameplayState != null) userPlayingState.BindTo(gameplayState.PlayingState); @@ -115,7 +115,8 @@ private void updateState() if (Flow.Alpha < 1) scroll.ScrollToStart(false); - Flow.FadeTo(player?.Configuration.ShowLeaderboard != false && (configVisibility.Value || AlwaysShown) ? 1 : 0, 100, Easing.OutQuint); + Flow.FadeTo(configVisibility.Value.ShouldDisplay(leaderboardProvider is MultiplayerLeaderboardProvider) ? 1 : 0, 100, Easing.OutQuint); + expanded.Value = !CollapseDuringGameplay.Value || userPlayingState.Value != LocalUserPlayingState.Playing || holdingForHUD.Value; } diff --git a/osu.Game/Screens/Play/HUDOverlay.cs b/osu.Game/Screens/Play/HUDOverlay.cs index 7da996c20897..32a092bd9cca 100644 --- a/osu.Game/Screens/Play/HUDOverlay.cs +++ b/osu.Game/Screens/Play/HUDOverlay.cs @@ -75,7 +75,7 @@ protected override bool ShouldBeConsideredForInput(Drawable child) public Bindable ShowHud { get; } = new BindableBool(); private Bindable configVisibilityMode; - private Bindable configLeaderboardVisibility; + private Bindable configLeaderboardVisibilityMode; private readonly BindableBool replayLoaded = new BindableBool(); @@ -194,7 +194,7 @@ private void load(OsuConfigManager config, RealmKeyBindingStore keyBindingStore, ModDisplay.Current.Value = mods; configVisibilityMode = config.GetBindable(OsuSetting.HUDVisibilityMode); - configLeaderboardVisibility = config.GetBindable(OsuSetting.GameplayLeaderboard); + configLeaderboardVisibilityMode = config.GetBindable(OsuSetting.GameplayLeaderboardVisibilityMode); if (configVisibilityMode.Value == HUDVisibilityMode.Never && !hasShownNotificationOnce) { @@ -416,7 +416,18 @@ public bool OnPressed(KeyBindingPressEvent e) return true; case GlobalAction.ToggleInGameLeaderboard: - configLeaderboardVisibility.Value = !configLeaderboardVisibility.Value; + switch (configLeaderboardVisibilityMode.Value) + { + case GameplayLeaderboardVisibilityMode.Never: + configLeaderboardVisibilityMode.Value = GameplayLeaderboardVisibilityMode.Multiplayer; + break; + case GameplayLeaderboardVisibilityMode.Multiplayer: + configLeaderboardVisibilityMode.Value = GameplayLeaderboardVisibilityMode.Always; + break; + case GameplayLeaderboardVisibilityMode.Always: + configLeaderboardVisibilityMode.Value = GameplayLeaderboardVisibilityMode.Never; + break; + } return true; } From 5fbef28fb310170ae101adcc915ffe56739ddc4b Mon Sep 17 00:00:00 2001 From: Nqtural Date: Sun, 26 Jul 2026 15:16:50 +0200 Subject: [PATCH 2/6] fix: migration for leaderboard visibility setting --- osu.Game/Configuration/OsuConfigManager.cs | 4 +++- osu.Game/OsuGame.cs | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index e866a1ba0e61..8d596fa09b24 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -152,6 +152,7 @@ protected override void InitialiseDefaults() SetDefault(OsuSetting.KeyOverlay, false); SetDefault(OsuSetting.ReplaySettingsOverlay, true); SetDefault(OsuSetting.ReplayPlaybackControlsExpanded, true); + SetDefault(OsuSetting.GameplayLeaderboard, true); // legacy migration only SetDefault(OsuSetting.GameplayLeaderboardVisibilityMode, GameplayLeaderboardVisibilityMode.Always); SetDefault(OsuSetting.AlwaysPlayFirstComboBreak, true); @@ -339,7 +340,6 @@ public enum OsuSetting ShowStoryboard, KeyOverlay, GameplayLeaderboard, // only used for migrating to `GameplayLeaderboardVisibilityMode` - GameplayLeaderboardVisibilityMode, PositionalHitsoundsLevel, AlwaysPlayFirstComboBreak, FloatingComments, @@ -470,5 +470,7 @@ public enum OsuSetting DashboardSortMode, DashboardDisplayStyle, + + GameplayLeaderboardVisibilityMode, } } diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 1fac9e9ee4ca..25bc4be856c6 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -1376,6 +1376,16 @@ private void applyConfigMigrations() dialogOverlay.Push(new MigrateNewAudioDialog(wasAlreadyUsing)); } + + if (combined < 20260723) + { + bool oldValue = LocalConfig.Get(OsuSetting.GameplayLeaderboard); + + LocalConfig.SetValue( + OsuSetting.GameplayLeaderboardVisibilityMode, + oldValue ? GameplayLeaderboardVisibilityMode.Always : GameplayLeaderboardVisibilityMode.Never + ); + } } private void handleBackButton() From 11675bf4e9521c3b6ec181cf9eb64c3bbebd29b7 Mon Sep 17 00:00:00 2001 From: Nqtural Date: Sun, 26 Jul 2026 16:31:12 +0200 Subject: [PATCH 3/6] chore: update UI texts from toggle to cycle Make it clear for users that the keybind cycles through modes, not just toggles leaderboard visibility. Update cycle order to be more predictable and consistent with order in settings menu dropdown. --- osu.Game/Configuration/OsuConfigManager.cs | 4 ++-- osu.Game/Input/Bindings/GlobalActionContainer.cs | 6 +++--- osu.Game/Localisation/GlobalActionKeyBindingStrings.cs | 4 ++-- osu.Game/Screens/Play/HUDOverlay.cs | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index 8d596fa09b24..fd4183d3843b 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -270,9 +270,9 @@ public override TrackedSettings CreateTrackedSettings() ), new TrackedSetting(OsuSetting.GameplayLeaderboardVisibilityMode, visibilityMode => new SettingDescription( rawValue: visibilityMode, - name: GlobalActionKeyBindingStrings.ToggleInGameLeaderboard, + name: GlobalActionKeyBindingStrings.CycleInGameLeaderboardVisibilityMode, value: visibilityMode.GetLocalisableDescription(), - shortcut: LookupKeyBindings(GlobalAction.ToggleInGameLeaderboard)) + shortcut: LookupKeyBindings(GlobalAction.CycleInGameLeaderboardVisibilityMode)) ), new TrackedSetting(OsuSetting.HUDVisibilityMode, visibilityMode => new SettingDescription( rawValue: visibilityMode, diff --git a/osu.Game/Input/Bindings/GlobalActionContainer.cs b/osu.Game/Input/Bindings/GlobalActionContainer.cs index 3d6cc0dab585..0d8861b0c52c 100644 --- a/osu.Game/Input/Bindings/GlobalActionContainer.cs +++ b/osu.Game/Input/Bindings/GlobalActionContainer.cs @@ -177,7 +177,7 @@ public static IEnumerable GetGlobalActionsFor(GlobalActionCategory new KeyBinding(new[] { InputKey.F3 }, GlobalAction.DecreaseScrollSpeed), new KeyBinding(new[] { InputKey.F4 }, GlobalAction.IncreaseScrollSpeed), new KeyBinding(new[] { InputKey.Shift, InputKey.Tab }, GlobalAction.ToggleInGameInterface), - new KeyBinding(InputKey.Tab, GlobalAction.ToggleInGameLeaderboard), + new KeyBinding(InputKey.Tab, GlobalAction.CycleInGameLeaderboardVisibilityMode), new KeyBinding(InputKey.MouseMiddle, GlobalAction.PauseGameplay), new KeyBinding(InputKey.Control, GlobalAction.HoldForHUD), new KeyBinding(InputKey.Enter, GlobalAction.ToggleChatFocus), @@ -442,8 +442,8 @@ public enum GlobalAction [LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.ToggleReplaySettings))] ToggleReplaySettings, - [LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.ToggleInGameLeaderboard))] - ToggleInGameLeaderboard, + [LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.CycleInGameLeaderboardVisibilityMode))] + CycleInGameLeaderboardVisibilityMode, [LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.EditorToggleRotateControl))] EditorToggleRotateControl, diff --git a/osu.Game/Localisation/GlobalActionKeyBindingStrings.cs b/osu.Game/Localisation/GlobalActionKeyBindingStrings.cs index 34ef8fb4ffa4..05053cd15b4e 100644 --- a/osu.Game/Localisation/GlobalActionKeyBindingStrings.cs +++ b/osu.Game/Localisation/GlobalActionKeyBindingStrings.cs @@ -250,9 +250,9 @@ public static class GlobalActionKeyBindingStrings public static LocalisableString ToggleInGameInterface => new TranslatableString(getKey(@"toggle_in_game_interface"), @"Toggle in-game interface"); /// - /// "Toggle in-game leaderboard" + /// "Cycle in-game leaderboard visibility mode" /// - public static LocalisableString ToggleInGameLeaderboard => new TranslatableString(getKey(@"toggle_in_game_leaderboard"), @"Toggle in-game leaderboard"); + public static LocalisableString CycleInGameLeaderboardVisibilityMode => new TranslatableString(getKey(@"cycle_in_game_leaderboard_visibility_mode"), @"Cycle in-game leaderboard visibility mode"); /// /// "Toggle mod select" diff --git a/osu.Game/Screens/Play/HUDOverlay.cs b/osu.Game/Screens/Play/HUDOverlay.cs index 32a092bd9cca..9b089f2a36f1 100644 --- a/osu.Game/Screens/Play/HUDOverlay.cs +++ b/osu.Game/Screens/Play/HUDOverlay.cs @@ -415,16 +415,16 @@ public bool OnPressed(KeyBindingPressEvent e) return true; - case GlobalAction.ToggleInGameLeaderboard: + case GlobalAction.CycleInGameLeaderboardVisibilityMode: switch (configLeaderboardVisibilityMode.Value) { case GameplayLeaderboardVisibilityMode.Never: - configLeaderboardVisibilityMode.Value = GameplayLeaderboardVisibilityMode.Multiplayer; - break; - case GameplayLeaderboardVisibilityMode.Multiplayer: configLeaderboardVisibilityMode.Value = GameplayLeaderboardVisibilityMode.Always; break; case GameplayLeaderboardVisibilityMode.Always: + configLeaderboardVisibilityMode.Value = GameplayLeaderboardVisibilityMode.Multiplayer; + break; + case GameplayLeaderboardVisibilityMode.Multiplayer: configLeaderboardVisibilityMode.Value = GameplayLeaderboardVisibilityMode.Never; break; } From bf899a182295835b4b9fd7be74d943b181f6f20c Mon Sep 17 00:00:00 2001 From: Nqtural Date: Sun, 26 Jul 2026 16:34:39 +0200 Subject: [PATCH 4/6] chore: make `ShouldDisplay` call more explicit `ShouldDisplay(true)` can be misleading. Update to include parameter name. --- .../OnlinePlay/Multiplayer/MultiplayerPositionDisplay.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerPositionDisplay.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerPositionDisplay.cs index fa941b1b2ad3..81a52db2c546 100644 --- a/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerPositionDisplay.cs +++ b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerPositionDisplay.cs @@ -126,7 +126,7 @@ protected override void PopOut() private void updateVisibility() { - bool shouldDisplay = userScore != null && (leaderboardVisibility.Value.ShouldDisplay(true) || localUserPlayingState.Value == LocalUserPlayingState.Break); + bool shouldDisplay = userScore != null && (leaderboardVisibility.Value.ShouldDisplay(isMultiplayer: true) || localUserPlayingState.Value == LocalUserPlayingState.Break); State.Value = shouldDisplay ? Visibility.Visible : Visibility.Hidden; } From c4ef559aaf044cbe09cb378c661c032a2dabdae0 Mon Sep 17 00:00:00 2001 From: Nqtural Date: Sun, 26 Jul 2026 16:36:06 +0200 Subject: [PATCH 5/6] fix: preserve `player` configuration Preserve `player.Configuration.ShowLeaderboard` in `DrawableGameplayLeaderboard`. --- osu.Game/Screens/Play/HUD/DrawableGameplayLeaderboard.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Play/HUD/DrawableGameplayLeaderboard.cs b/osu.Game/Screens/Play/HUD/DrawableGameplayLeaderboard.cs index 02c10ce56b11..f71bfc9aa0ec 100644 --- a/osu.Game/Screens/Play/HUD/DrawableGameplayLeaderboard.cs +++ b/osu.Game/Screens/Play/HUD/DrawableGameplayLeaderboard.cs @@ -115,7 +115,8 @@ private void updateState() if (Flow.Alpha < 1) scroll.ScrollToStart(false); - Flow.FadeTo(configVisibility.Value.ShouldDisplay(leaderboardProvider is MultiplayerLeaderboardProvider) ? 1 : 0, 100, Easing.OutQuint); + Flow.FadeTo(player?.Configuration.ShowLeaderboard != false + && configVisibility.Value.ShouldDisplay(leaderboardProvider is MultiplayerLeaderboardProvider) ? 1 : 0, 100, Easing.OutQuint); expanded.Value = !CollapseDuringGameplay.Value || userPlayingState.Value != LocalUserPlayingState.Playing || holdingForHUD.Value; } From 55c877736e12e41ea2e18f141b5604ef26985f57 Mon Sep 17 00:00:00 2001 From: Nqtural Date: Tue, 28 Jul 2026 00:44:33 +0200 Subject: [PATCH 6/6] chore: fix linter warnings Code scanning results / InspectCode GitHub task. --- .../OnlinePlay/Multiplayer/MultiplayerPositionDisplay.cs | 2 +- osu.Game/Screens/Play/HUD/DrawableGameplayLeaderboard.cs | 3 +-- osu.Game/Screens/Play/HUDOverlay.cs | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerPositionDisplay.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerPositionDisplay.cs index 81a52db2c546..9311161e694d 100644 --- a/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerPositionDisplay.cs +++ b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerPositionDisplay.cs @@ -28,7 +28,7 @@ public partial class MultiplayerPositionDisplay : VisibilityContainer { private readonly IBindable user = new Bindable(); private readonly IBindableList scores = new BindableList(); - private readonly Bindable leaderboardVisibility = new(); + private readonly Bindable leaderboardVisibility = new Bindable(); private readonly IBindable localUserPlayingState = new Bindable(); private readonly Bindable position = new Bindable(); diff --git a/osu.Game/Screens/Play/HUD/DrawableGameplayLeaderboard.cs b/osu.Game/Screens/Play/HUD/DrawableGameplayLeaderboard.cs index f71bfc9aa0ec..be95c16394df 100644 --- a/osu.Game/Screens/Play/HUD/DrawableGameplayLeaderboard.cs +++ b/osu.Game/Screens/Play/HUD/DrawableGameplayLeaderboard.cs @@ -115,8 +115,7 @@ private void updateState() if (Flow.Alpha < 1) scroll.ScrollToStart(false); - Flow.FadeTo(player?.Configuration.ShowLeaderboard != false - && configVisibility.Value.ShouldDisplay(leaderboardProvider is MultiplayerLeaderboardProvider) ? 1 : 0, 100, Easing.OutQuint); + Flow.FadeTo(player?.Configuration.ShowLeaderboard != false && configVisibility.Value.ShouldDisplay(leaderboardProvider is MultiplayerLeaderboardProvider) ? 1 : 0, 100, Easing.OutQuint); expanded.Value = !CollapseDuringGameplay.Value || userPlayingState.Value != LocalUserPlayingState.Playing || holdingForHUD.Value; } diff --git a/osu.Game/Screens/Play/HUDOverlay.cs b/osu.Game/Screens/Play/HUDOverlay.cs index 9b089f2a36f1..302a72a40cb2 100644 --- a/osu.Game/Screens/Play/HUDOverlay.cs +++ b/osu.Game/Screens/Play/HUDOverlay.cs @@ -421,9 +421,11 @@ public bool OnPressed(KeyBindingPressEvent e) case GameplayLeaderboardVisibilityMode.Never: configLeaderboardVisibilityMode.Value = GameplayLeaderboardVisibilityMode.Always; break; + case GameplayLeaderboardVisibilityMode.Always: configLeaderboardVisibilityMode.Value = GameplayLeaderboardVisibilityMode.Multiplayer; break; + case GameplayLeaderboardVisibilityMode.Multiplayer: configLeaderboardVisibilityMode.Value = GameplayLeaderboardVisibilityMode.Never; break;