Skip to content
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

Make ImGui popup respond properly to 'h' and 'l' keys when highlighting selected option #72619

Merged

Conversation

katemonster33
Copy link
Contributor

@katemonster33 katemonster33 commented Mar 25, 2024

Summary

Bugfixes "Fixed issue where user could only change the selected option in the ImGui popup using the arrow keys or tab key"

Purpose of change

Fixes: #72599
Fixes: #72093

Describe the solution

ImGui popup was relying on ImGui's keyboard navigation, but because this isn't based on CDDA's keybindings, it leads to confusing situations where the bound keys don't work to, for instance, change the focused button in the popup.

Describe alternatives you've considered

We could try and implement some infrastructure for tying ImGui's input handling to Cataclysm's own input system, but that would require lots of sleepless nights.

Testing

From the main menu, delete a world, and verify that the correct buttons work to select the option in the popup, without buttons like tab changing the focus unexpectedly

Additional context

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Mar 25, 2024
@katemonster33 katemonster33 force-pushed the imgui_popup_navigation_broken branch 2 times, most recently from 8370298 to aad96d2 Compare March 26, 2024 16:58
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Mar 26, 2024
@dseguin dseguin merged commit e746932 into CleverRaven:master Mar 27, 2024
20 of 26 checks passed
SurFlurer added a commit to SurFlurer/Cataclysm-DDA that referenced this pull request Aug 26, 2024
…en moving button focus back and forth. (CleverRaven#72619)"

This reverts commit e746932.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[imgui] Can't switch between popup buttons with vimkeys ImGui window. Default answer choice
2 participants