Actually, it doesn't just update the string.. Found it out tonight that you could use shortcuts for selecting class, didn't know that How to reproduce: Bring up your class selection menu, press E, G, R or S. A to accept. (I spawned normally as a Scout).
Going to need some info from the person implemented the shortcuts. Where are the shortcuts defined? I did a search for "acceptLoadout" in both the code and SVN and couldn't find the source of the string.
The culprit would be me... I've added the E/G/R/S-hotkeys to the resources/ui/class2.res (at the end as invisible buttons, since the dropdown didn't directly support hotkeys), they're sending the same commands as the dropdown selections. The problem seems to be that just the dropdown selection is not updated to the current state when the layout is updated. Sorry for this extra work - in some weird case of gui-blindness I've never noticed this until now, and have mistaken this bug as the old wrong-loadout-after-revive... This is probably a duplicate of Vicki's bug: The loadout is that of the scout, because she somehow pressed 's' after she opened it wafter having previously selected engy in the dropdown. If noone wants to touch the dropdown-update code, I can just remove the class hotkeys. The number hotkeys seem to work flawlessly though, so I'd like to keep them.
Okay I think I fixed it. Fixed in cdf6810fbb1fa3d90d2a2034870ccc83767a8bf5. Did you define hotkeys for other menus?
In class2.res and also in class_submenu.res for the generic/specific (G/S) dropdown (and submenu button numbers).
It's honestly incredible that you managed to anything at all like this without code support. Is it only possible for the class menu or can you do anything with the comm menu? I've always wanted building hotkeys.
The comm gui is out of reach for me, as it seems fully code generated and doesn't use any .res templates where I could sneak something in. The vehicle menu has little room for hotkeys: The dropdowns for chassis and loadout seem to handle selection in their own way, and the few recognised command keywords that I could figure out are of questionable use for hotkeys (like switching between weapon/armor/engine config panels or accidentally building random garbage vehicles).
The secret lies in the vgui Label-class, which the button control uses for its text. It scans the label text (defined in the .res) for characters preceded by '&' and sets these as hotkeys. Being able to change them from the controls menu would probably require code to adjust the button labels with the defined hotkeys. Imho being able to reconfiguring them is of limited help, since they are only valid in the context of the currently open class menu or submenu, and the label-hotkeys are restricted to alphanum chars, so you wouldn't be able to bind them to f-keys and the like. To give the player a hint about the class hotkeys, I could change the dropdown descriptons to something like [G] - Grenadier [E] - Engineer ... Maybe not overly elegant, but still a visible clue...
Need a better hotkey solution for those dropdown menus, this is somewhat hacky what I am doing. Anyway fixed in 3ad5b5f58fd3ffb1d688372e0d78bea04f90b446.
Yes, seems to work - though I have to use 1,2,3,4 (nf,be,spec,auto) for the team selection, because 'b' and 'n' inferferes with the chooseclass/chooseteam bindings, which are also 'b' and 'n' by default, and causes popup-spam with both class and the team selection panels suddenly open. Works well with the numbers though. I'll put the modifications with the rest of the stuff which I still need to have committed by someone...
Can you add the shortcuts to the names of the teams in the selection? So it says Northern Faction [1] ?
Yes, that seems to be the problem: Whatever I set as label text for nf/be/spec is updated by code with a formatted sting containing the current number of players. I could possibly position a dummy number label next to the buttons, but that would look awkward somehow... While thinking about it now, maybe replacing the simple buttons with bigger nf/be-themed button graphics could work and provide room for a hotkey label. I'll have to check how much of the layout from the .res is retained when the panel is prepared, to see if this could work.