-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Convert gameplay leaderboard to skinnable component #32939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…ations As time goes on, default skin layouts are getting more and more complicated because of per-ruleset overrides. This was already sort of apparent in ppy#31527, and I'm about to make it worse, so before I do, this is a test scene that is supposed to make it easier to check all possible combinations at a glance.
This PR converts the leaderboard into a full-fledged skinnable component that can be manipulated by users at will. Notably, this finally allows ppy#20422 to be fixed - although it's a very mixed bag, for several reasons: - Because of taiko players' refusal to see reason^W^W^W^Winsistence on keeping stable behaviours related to aspect ratio treatment, I have to assume the worst case scenario, which means than on typical resolutions like 16:9 (or even worse, 4:3), the leaderboard will likely not occupy as much vertical space as it probably could. - Additionally, there's the problem of where to put the spectator list. I settled on putting it to the right of the leaderboard, but that's kind of janky, because the leaderboard sometimes collapses and sometimes fully hides, leading to a very awkward space left behind. If we had the capability to anchor elements to other elements, maybe this could be resolved, but for now, I'm not sure what to do. I think if some users are bothered by it they can move it where they want it. Or delete it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on whether we want to offer a "legacy" variant of the leaderboard matching stable skins, it might be a good idea to rename this component to something like ArgonGameplayLeaderboard
before it gets persisted to the JSONs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with either. We already have a good flow for migrating component names so it's not a huge deal.
@@ -71,10 +70,7 @@ private void load() | |||
|
|||
ScoreProcessor.ApplyNewJudgementsWhenFailed = true; | |||
|
|||
LoadComponentAsync(new GameplayChatDisplay(Room) | |||
{ | |||
Expanded = { BindTarget = LeaderboardExpandedState }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This being coupled to leaderboard expansion state is a bit of a spoke in the wheel. I simplified this to just use LocalUserPlaying
which is one half of what was steering the expansion state. Maybe fine?
leaderboard.Anchor = Anchor.BottomLeft; | ||
leaderboard.Origin = Anchor.BottomLeft; | ||
leaderboard.Position = pos; | ||
leaderboard.Height = 170; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This height can be improved later when the positioning of taiko combo counter is adjusted to match stable (should be on the drum).
- Naming wasn't adjusted - When the chat collapsed, the team score display broke due to zero width Partial revert of ppy@da1fc10.
Makes the leaderboard a full skinnable component (placed in the ruleset-specific layer).
Users with skins that have custom HUD layouts need to add the gameplay leaderboard back themselves in their desired position.
This change also allows the leaderboard to stop overlapping the playfield in taiko.
This PR converts the leaderboard into a full-fledged skinnable component that can be manipulated by users at will.
Notably, this finally allows #20422 to be fixed - although it's a very mixed bag, for several reasons:
refusal to see reasoninsistence on keeping stable behaviours related to aspect ratio treatment, I have to assume the worst case scenario, which means than on typical resolutions like 16:9 (or even worse, 4:3), the leaderboard will likely not occupy as much vertical space as it probably could.As with the spectator list, if some users have modified the layout on their skin, they will not have the leaderboard added back, and I'm not trying to add any migrations to try and do it for them.
Recommend reviewing with whitespace off.