Skip to content

Commit b1b3689

Browse files
authored
Merge pull request #34204 from bdach/multi-leaderboard-hides
Fix multiplayer spectator leaderboard respecting "show leaderboard" config setting
2 parents f8004a6 + 0f272ea commit b1b3689

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/MultiSpectatorScreen.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ private void load()
154154
});
155155
leaderboardFlow.Insert(0, Leaderboard = new DrawableGameplayLeaderboard
156156
{
157-
CollapseDuringGameplay = { Value = false }
157+
CollapseDuringGameplay = { Value = false },
158+
AlwaysShown = true,
158159
});
159160

160161
LoadComponentAsync(new GameplayChatDisplay(room)

osu.Game/Screens/Play/HUD/DrawableGameplayLeaderboard.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public partial class DrawableGameplayLeaderboard : CompositeDrawable, ISerialisa
2828

2929
public DrawableGameplayLeaderboardScore? TrackedScore { get; private set; }
3030

31+
public bool AlwaysShown { get; init; }
32+
3133
[SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.CollapseDuringGameplay), nameof(SkinnableComponentStrings.CollapseDuringGameplayDescription))]
3234
public Bindable<bool> CollapseDuringGameplay { get; } = new BindableBool(true);
3335

@@ -109,7 +111,7 @@ private void updateState()
109111
if (Flow.Alpha < 1)
110112
scroll.ScrollToStart(false);
111113

112-
Flow.FadeTo(player?.Configuration.ShowLeaderboard != false && configVisibility.Value ? 1 : 0, 100, Easing.OutQuint);
114+
Flow.FadeTo(player?.Configuration.ShowLeaderboard != false && (configVisibility.Value || AlwaysShown) ? 1 : 0, 100, Easing.OutQuint);
113115
expanded.Value = !CollapseDuringGameplay.Value || userPlayingState.Value != LocalUserPlayingState.Playing || holdingForHUD.Value;
114116
}
115117

0 commit comments

Comments
 (0)