-
-
Notifications
You must be signed in to change notification settings - Fork 433
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
[L4D2] Panel Items with ITEMDRAW_DISABLED / ITEMDRAW_NOTEXT are still functional when selected #2206
Comments
I believe this has always been the case for L4D2, it's related to the sourcemod/gamedata/core.games/common.games.txt Lines 386 to 399 in 4e15a92
sourcemod/core/MenuStyle_Radio.cpp Lines 476 to 484 in 4e15a92
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. |
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
The text was updated successfully, but these errors were encountered: