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

OptionButton menu not closable with joypad #80425

Closed
wez470 opened this issue Aug 8, 2023 · 4 comments · Fixed by #80594
Closed

OptionButton menu not closable with joypad #80425

wez470 opened this issue Aug 8, 2023 · 4 comments · Fixed by #80594

Comments

@wez470
Copy link

wez470 commented Aug 8, 2023

Godot version

v4.1.stable.official [9704596]

System information

Godot v4.1.stable - Windows 10.0.22000 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 SUPER (NVIDIA; 30.0.15.1295) - Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz (8 Threads)

Issue description

OptionButton menu's do not seem to be closable using a joypad. They can be closed using ESC on a keyboard. Setting a ui_cancel mapping for the joypad does not fix the issue. Further, the MenuButton seems to exhibit the same behaviour based on this Reddit post. I would expect to be able to close the menu from the joypad using a button mapped to ui_cancel.

Steps to reproduce

  1. Add an OptionButton to project
  2. Setup ui_cancel input mapping to have a joypad mapping
  3. Run the project and open the OptionButton menu.
  4. Try to close the window without selecting an option using the joypad. This is the step that does not work. Pressing ESC will close the window.

Minimal reproduction project

OptionButtonReproProject.zip

@rsubtil
Copy link
Contributor

rsubtil commented Aug 9, 2023

The current code is hardcoded to only consider keyboard keys. This patch fixes it:
retrohub-org@e204d49

@wez470
Copy link
Author

wez470 commented Aug 11, 2023

Can we submit a PR with that change then?

@rsubtil
Copy link
Contributor

rsubtil commented Aug 11, 2023

Can we submit a PR with that change then?

I'll only be available next Monday. But if you want, feel free to grab the patch and make the PR already.

@wez470
Copy link
Author

wez470 commented Aug 21, 2023

Thanks for handling this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants