Allow ability to select menu choices in OptionButton by Button Press/Release action modes #7981
yosimba2000
started this conversation in
GUI
Replies: 1 comment 1 reply
-
A similar behavior for PopupMenu is reported in godotengine/godot#81297 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is for Godot 4.1 .Net version.
So the OptionButton node itself has a property called Action Mode that allows you to choose when the menu should be displayed: on button press, or on button release. Right now, I have it set to Action Mode = On Button Release.
When using Mouse as input device, the behavior is as expected. But the behavior is NOT as expected when using controller (I am using PS5 controller).
The expected behavior is this:
item_selected
is emitted.When using controller, the actual behavior is this:
item_selected
is emitted. At this time, the OptionButton is now focused because the choice menu disappeared. Remember, you are still pressing down the controller button.The same issue occurs with Action Mode = On Button Press, except it happens when you press the button and not release.
So as you can see, when using a controller, the user enters a cyclic menu open/close scenario that can only be escaped in one way:
Solution:
Allow us to select menu options within an OptionButton using Action Mode = On Button Release. So basically the OptionButton itself will keep its Action Mode, but the menu choices inside it will also only be selected using Action Mode = On Button Release. This way, the menu only closes after user releases controller button, and not on button press.
I have adjusted the default UI_Accept input mapping to also include the X button on the PS5 controller, which is what I'm using to activate the buttons/menus.
Beta Was this translation helpful? Give feedback.
All reactions