-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Fixed UI navigation using joy axis inputs #31880
Fixed UI navigation using joy axis inputs #31880
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For each action, the is_action_pressed
check should be removed, it becomes redundant with the is_action_just_pressed
check.
Are you sure it would be safe? |
I see what you mean, but what you are doing here is likely not really consistent then. Anyway, I kind of think this is not the perfect solution. I believe you should be able to keep the stick pressed to navigate on several entries, so you don't have to bring the stick to the center all the time on long lists. However that would require to setup a configurable timer between two focus change (and maybe another one offset the first change before it changes repeatedly). |
I agree, there's probably a more consistent solution to be implemented for this. This implementation just seemed safe and easy to do :) Concerning moving through the menu by holding the stick, I love the idea but I think it could be added in a more general way for all input types, since there's also no support for key repeat on keyboard or joy buttons as far as I know. |
Thanks! |
This change fixes glitches when using joy axis inputs for ui navigation. Now inputs are only applied on the first frame they occur, even when joystick events are still being received.
Fixes #31879