Skip to content

Detect invalid menu item selections in L4D-based games#1543

Merged
asherkin merged 1 commit intomasterfrom
bug-1385
Jul 18, 2021
Merged

Detect invalid menu item selections in L4D-based games#1543
asherkin merged 1 commit intomasterfrom
bug-1385

Conversation

@asherkin
Copy link
Member

Some games have implemented CHudMenu::SelectMenuItem to close the menu
even if an invalid slot has been selected, which causes us a problem as
we'll never get any notification from the client and we'll keep the menu
alive on our end indefinitely. For these games, pretend that every slot
is valid for selection so we're guaranteed to get a menuselect command.
We don't want to do this for every game as the common SelectMenuItem
implementation ignores invalid selections and keeps the menu open, which
is a much nicer user experience.

Fixes #1385

@asherkin asherkin requested a review from psychonic July 18, 2021 17:24
Some games have implemented CHudMenu::SelectMenuItem to close the menu
even if an invalid slot has been selected, which causes us a problem as
we'll never get any notification from the client and we'll keep the menu
alive on our end indefinitely. For these games, pretend that every slot
is valid for selection so we're guaranteed to get a menuselect command.
We don't want to do this for every game as the common SelectMenuItem
implementation ignores invalid selections and keeps the menu open, which
is a much nicer user experience.

Fixes #1385
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MenuAction not firing on MenuHandler when a key is pressed on undraw [1-7] options

2 participants