Add spectator list component
Implements the Component needed for #22087
Styling is essentially like the In-Gameplay Leaderboard, just barebones.
Functionality:
- Only display if any spectators are registered
- Remove a user from the spectator list by username. I went with
Username, since that is also what is displayed and inherently unique in real circumstances. - Setting for displaying the component (currently would do nothing outside the visual tests)
- Dynamically hide the list of users if a configurable threshhold is overstepped
- Localisable string for "Spectators"
https://user-images.githubusercontent.com/10248041/222982285-f58a7ff0-0bfd-46c7-97b2-52750880d62b.mp4
I'm not sure if copying the leaderboard is a good idea. IMO the HUD will get cluttered pretty fast, especially on smaller screens where everything is already cluttered. The advantage of stable's spectator list is that it is small enough to not distract the player because it's only text. But I guess it also makes sense to also show the avatars so idk.
@arflyte Have you thought about how spectators should be displayed in lazer? Keep in mind there can be hundreds present. Stable shows the first x and then a "..." in a very compact vertical list, with a number at the top.
We probably want something similar?
@arflyte second ping
In my opinion, if this have errors then will need to fix. After that, you can merge the pr here since the feature is in stable, not lazer (This should be skinnable in the skin layout editor as long as it is viewable as a sprite in gameplay.)
@arflyte final ping
For spectator list I imagined just a simple list. Wouldn't want to clutter the screen too much. Show as many names according to the size of the frame, cut off with ellipsis.
@arflyte so precisely what stable has?
Should they be interactive? ie. if i'm watching a play session and want to message another spectator from the list.
We should probably revive this one.
"Revive" it using which design? The original one from the OP or the one provided in https://github.com/ppy/osu/pull/22795#issuecomment-1579936284?
New design seems like what stable has, so I'd say we'd go with that as a starting point.