fix(Focus): re-focus ui if focus is lost but a direction is pressed#483
Merged
ShadowApex merged 1 commit intomainfrom Sep 22, 2025
Merged
fix(Focus): re-focus ui if focus is lost but a direction is pressed#483ShadowApex merged 1 commit intomainfrom
ShadowApex merged 1 commit intomainfrom
Conversation
pastaq
requested changes
Aug 15, 2025
Collaborator
pastaq
left a comment
There was a problem hiding this comment.
Can you also ensure the overlay mode input manager has parity?
fa11a3a to
1766250
Compare
pastaq
approved these changes
Aug 17, 2025
Collaborator
pastaq
left a comment
There was a problem hiding this comment.
Looks good. No time to test, send it if you think it works everywhere
Contributor
|
🎉 This PR is included in version 0.42.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In some cases, a user may find themselves in a position where no UI element is currently focused and will be unable to use the joystick or d-pad to regain control. This change updates the
InputManagerto find a focusable node and focus it if a direction is pressed and nothing is focused, ensuring that the user will always be able to use gamepad controls.Because the logic already exists for recursively finding a focusable node in
FocusGroup, this change updates thefind_focusablemethod in that class to be a public static method so it can be used elsewhere.