From 04871fe55a3f4855ff71627c8e09236229dd9cff Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 11 Jun 2025 17:35:53 +0900 Subject: [PATCH] Add setting to leaderboard to allow disabling automatic collapsing Was a 2 minute implementation, so why not? Addresses https://github.com/ppy/osu/discussions/33523. --- osu.Game/Screens/Play/HUD/DrawableGameplayLeaderboard.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Play/HUD/DrawableGameplayLeaderboard.cs b/osu.Game/Screens/Play/HUD/DrawableGameplayLeaderboard.cs index a7c4bc99b2..49b46298c9 100644 --- a/osu.Game/Screens/Play/HUD/DrawableGameplayLeaderboard.cs +++ b/osu.Game/Screens/Play/HUD/DrawableGameplayLeaderboard.cs @@ -29,6 +29,9 @@ namespace osu.Game.Screens.Play.HUD public DrawableGameplayLeaderboardScore? TrackedScore { get; private set; } + [SettingSource("Collapse during gameplay", "If enabled, the leaderboard will become more compact during active gameplay.")] + public Bindable CollapseDuringGameplay { get; } = new BindableBool(true); + [Resolved] private Player? player { get; set; } @@ -98,6 +101,7 @@ namespace osu.Game.Screens.Play.HUD userPlayingState.BindValueChanged(_ => Scheduler.AddOnce(updateState)); holdingForHUD.BindValueChanged(_ => Scheduler.AddOnce(updateState)); ForceExpand.BindValueChanged(_ => Scheduler.AddOnce(updateState)); + CollapseDuringGameplay.BindValueChanged(_ => Scheduler.AddOnce(updateState)); updateState(); } @@ -108,7 +112,7 @@ namespace osu.Game.Screens.Play.HUD scroll.ScrollToStart(false); Flow.FadeTo(player?.Configuration.ShowLeaderboard != false && configVisibility.Value ? 1 : 0, 100, Easing.OutQuint); - expanded.Value = ForceExpand.Value || userPlayingState.Value != LocalUserPlayingState.Playing || holdingForHUD.Value; + expanded.Value = !CollapseDuringGameplay.Value || ForceExpand.Value || userPlayingState.Value != LocalUserPlayingState.Playing || holdingForHUD.Value; } ///