Open Mute-255 opened 5 days ago
I believe this has always been the case for L4D2, it's related to the RadioMenuClosesOnInvalidSlot
workaround:
The menu system does have it's own validity concept which it uses to filter these out of the callback, but panels are meant to be a very low-level abstraction. MenuStyle_Radio
does have the true key map, so it could filter them out itself in ClientPressedKey
if the workaround is in use.
Your response has implanted a little doubt, but I'm like 99% sure this hasn't always been the case, over several years I've made quite a lot of panels under the impression and implementation that clicking a disabled/hidden option will just close the panel, and it definitely worked as intended back then. I wish I had some form of video recording showing it working as intended but it's not something I foresaw breaking like this. I also feel like if this was always the case it would have been mentioned either here or anywhere else, yet I could not find any mention of this issue.
Help us help you
Left 4 Dead 2 on Linux server, SM 1.11.0.6968 / MM 1.11.0-dev+1155
Description
If a Panel created with
CreatePanel
has items with theITEMDRAW_DISABLED
orITEMDRAW_NOTEXT
draw style flags, in the past selecting these options would simply close the panel without passing theaction == MenuAction_Select
check in the callback (or maybe it didn't call the callback at all, I don't know). However, these options are now passing through when they shouldn't, meaning disabled and hidden menu options are incorrectly functioning equivalent to regular menu options. This does not seem to happen to Menus created withCreateMenu
.Example Code