Hello, I would like to navigate in my menu with arrow keys and the gamepad’s d-pad but at the moment, any of those keys just unfocus my menu. I read in this thread UI Navigation is worse than ever that you can disable the tab navigation but I think what I want to do is make
- up mean next
- down mean previous
- left mean cancel
Any tips on how I could customize the NavigationMoveEvent callback to make this happen?
Create an array of the UI buttons and select with two gamepad button up (array [n+1]) and down (array [n-1])
They’ve tagged this pose UI Toolkit so that alone isn’t going to work, as it already automatically handles navigation.
To answer OP’s post, and to mention some things:
It’s likely that it’s focusing on something you didn’t expect it to.
I believe you would register the callback to the common parent visual element of these buttons, then from that point you just check the direction and direct the logic as desired. You probably also need to prevent any further propagation of the event as well.