Repository navigation
Conversation
|
There are still some things I'd like to fix:
I think I can figure out the first one, but this is my first time making a PR to this codebase, so any help regarding the other two would be greatly appreciated! TBH I'm not even sure what info should be displayed/how to make it pretty |
ea75a52 to
72d0422
Compare
|
First of: I really appreciate what you did here. However, I have to say that it does not fit our design language so far. I'm a bit confused why your scrollbar looks different. And you should put the content in forms instead of bare strings |
|
@TimGoll sure, I can use forms like how admin Roles page works, I guess these would be in form help text and just not have any of the config toggles/inputs? As for the scrollbar looking different, I'm not sure why it's like that. I'm using a DScrollPanel instead of a DSubmenuList as the latter required a bunch of fields/data to be set that seems to only be on pages derived from Sidenote, would you know how to remove the margin around the content area in this gamemode submenu? I don't think I explicitly set any margin here (and in other submenus I see there is a margin so it looks like something set at a default level) |
|
Also just linking the thread from discord to bring the discussion together: https://discord.com/channels/442107660955942932/1402951259601768519 |
Yes, for example by using help boxes which automatically support localization and line wrapping. However, I envisioned something way more in-depth for the guide, but I struggle to find any time to work on it.
That's probably it. The submenu list is heavily modified to have the style I was aiming for. It has been a while, I'm not so sure anymore how exactly it works. As you can see in #1752 I also started to completely refactor the codebase of vgui, because stuff like you encountered here really annoyed me.
I think this is defined in the base menu in cl_help. If you want to change it, it will probably cause some pain for you because this propagates through the whole menu. |
The roles guide now lists every registered role and shows its description, team and base role in a read-only view. Descriptions use the same ttt2_desc_<name> language identifier as the role settings menu, with a fallback for roles that do not provide one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
72d0422 to
8e47850
Compare
Roles that are disabled in the role settings can never be assigned, so they should not be shown to players in the guide. The role settings are fetched from the server, since server convars are authoritative. Roles that are not distributable are still shown, as they can be handed out during a round. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Whether a role is enabled is decided by server convars, which cannot be read by non-admin clients. Add a request that returns all roles that can actually be assigned, so that clients can filter out disabled roles, e.g. in the roles guide. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
List all installed equipment with its name, type, description and the roles that are able to buy it. Equipment without a description falls back to a generic hint, equipment that can only be handed out by a role is listed as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@TimGoll wanted to revive this as I got some time to look at it again, here are some screenshots of it in game
Wasn't sure how to fill in the Gameplay section since that might be more subjective than just piping data into a view. |
|
@saibotk just tagging you as I saw you were the most recently active in other prs! |
|
@ROODAY |
|
@Nosebody thanks for the feedback! Is this a mockup or is there a branch I can base off of? Regardless I have some questions on how to implement this view:
|
|
Sorry that picture is a render, it is not build on code, i am more on the design side. |
|
I see, I can update to add role colors, group by team, and show the shop data. For the how to play, I don't think we should create by hand. Perhaps we can expose a field on roles that allows formatted text (markdown/html etc?) for the how to play section, but then this will be empty for most roles until role addon authors update to supply this info. |
Roles are grouped by team in collapsible sections and shown as cards with their icon, role color, team color and Built-in/Shop tags. The page can be searched and filtered by team. Selecting a card opens the role details below its row: description, "How to play", properties (base role, shop, starting credits, public visibility) and the equipment of the role's shop. The starting credits are a server only convar, they are now sent along with the enabled roles. Role addons can provide a "How to play" section with the language identifier ttt2_howtoplay_<rolename>. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@Nosebody I reworked the roles page based on your mockup, here's how it looks now:
What's in it:
For "How to play", roles can now provide an optional language key, I wrote the "How to play" texts for Innocent, Traitor and Detective myself. Could you check whether that copy works for you, or if you'd phrase anything differently? For all other roles, the plan is to let the role addon creators add a "How to play" text to their roles themselves. One deviation from the mockup: your mockup had the Detective's bar in blue, but since you suggested using the same color for the same team, the bar uses the team color and the icon box keeps the role color. Could you also share a mockup for the Equipment page? I've left it as it is for now so it can follow your design. |









Completes the Roles and Equipment pages in the help menu's Guide section. Both pages are read-only and show what is actually available on the server, so new players can look up what exists in a round.
Roles
roles.RequestEnabledRoles) that returns the indices of all roles that are part of the game. Roles that are not distributable are always listed, since they can still be handed out during a round (e.g. revival or sidekick roles).ttt2_desc_<role>language identifiers as the role settings menu, with a fallback string for roles that do not provide one instead of showing the raw identifier.Equipment
Notes
DLabel:DLabelTTT2paints its text withdraw.SimpleTextand therefore cannot wrap long descriptions.🤖 Generated with Claude Code