Leaderboard visibility modes - #38417
Conversation
Add option to display gameplay leaderboard in multiplayer lobbies only.
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.
`ShouldDisplay(true)` can be misleading. Update to include parameter name.
Preserve `player.Configuration.ShowLeaderboard` in `DrawableGameplayLeaderboard`.
|
The leaderboard is already deletable via the skin editor, so I do not understand the need for this toggle. |
I may not have been clear enough in the PR description. This does not introduce a new toggle; the existing "Always show gameplay leaderboard" toggle is being expanded into a three-state option:
The keybinding that previously toggled the leaderboard between enabled and disabled has also been adapted to this new functionality, cycling through the three visibility modes.
As far as I know, skins can not know if a game is multiplayer or singleplayer. This new option does. This option allows the leaderboard visibility to be controlled based on game context rather than just whether the element exists in the skin. |
|
I understood what the feature is. I am also saying this feature is possibly wanted by nobody. There is no preceding discussion thread linked in the OP and people generally offended by the leaderboard want it gone at all times, which is doable by deleting it. There already is a permanent position marker in multiplayer that is not deletable as well. |
|
That is fair. I opened this PR because it is a workflow I personally wanted, not because it came from a prior discussion. My reasoning is that the leaderboard serves a different purpose in multiplayer than it does in singleplayer. In multiplayer you are actively competing against other players, so seeing your relative position is useful. In singleplayer, it is just a comparison against a static score, which I personally find much less useful. I understand that others may not share that preference, that is why I tried my best to only add without changing too much existing behavior, but if this is not something you and the rest of the maintainers think is worth adding, that is completely fine. |
8c820d2 to
69375d7
Compare
69375d7 to
55c8777
Compare
Code scanning results / InspectCode GitHub task.
Option to display leaderboard in multiplayer games only
Expand the "Always show gameplay leaderboard" toggle option into a dropdown to allow users to display the gameplay leaderboard in multiplayer games, but have it disabled in singleplayer.
GameplayLeaderboardVisibilityModeExtensions.cs was added to avoid logic duplication as this logic has two consumers: DrawableGameplayLeaderboard.cs and MultiplayerPositionDisplay.cs.
Keybinding
The old keybinding for toggling the leaderboard now cycles between the different visibility modes and is thus renamed to "Cycle in-game leaderboard visibility mode".
Migration
Users who have "Always show gameplay leaderboard" toggled on (old default behavior) migrate to "Always", which is both the new default and identical to previous behavior. Users who have the option toggled off migrate to "Disabled", which is also identical to previous behavior.
The keybinding remains the same without needing a migration.