-
-
Notifications
You must be signed in to change notification settings - Fork 241
Improve gamepad navigation and on-screen keyboard handling #2114
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
base: dev
Are you sure you want to change the base?
Conversation
Refines on-screen keyboard support by ensuring SDL text input is started and stopped only when necessary, adds explicit UWP InputPane handling in the GUI. Also updates gamepad mapping to use the A button for both Activate and Text Input/OSK actions.
Adds logic to clear ImGui active ID when the gamepad face right button is pressed while editing text fields, improving navigation and input experience, especially on UWP. Also includes necessary inclusion of imgui_internal.h and event handling for the UWP on-screen keyboard.
Enhanced gamepad navigation in the GUI by allowing D-pad, left analog stick, and shoulder bumpers for tab navigation/switching. Added logic to track and switch tabs in the settings menu, also left analog stick can now navigate the GUI and right analog stick can now scroll the GUI (this fixes not being able to scroll to custom folders that are not initially visible when only using a gamepad)
|
Can you explain what you are trying to achieve with this PR: the changes involved and the problem(s) being solved? I see several changes that significantly change the way the UI is used, and I don't have any rationale for it. It looks like a right thumbstick is now required to scroll. What if the user's gamepad doesn't have one? (The original dreamcast controller, and it's modern reincarnation don't). Why this change? Last time I worked on the Xbox platform I had no issue navigating the UI with a gamepad, and the on-screen keyboard was working fine. I clearly remember it because I was working on network stuff and that required me to enter IP addresses, user name, etc. And nobody has reported any UI-related issue on Xbox afaik. You are disabling flattened navigation in some areas, which makes them difficult to use with a gamepad and degrades user experience (IMHO). Also, why is UWP-specific code now needed in generic UI code? What is it doing? I'm really worried about the potential regressions from this PR, including on the Android platform with its touch interface. So please make sure that this is tested on this platform too. |
Replaces the 'flags' argument in all BeginListBox calls with ImGuiWindowFlags_NavFlattened for the original behavior in settings_general.cpp.
|
At least on UWP the on screen keyboard did not open for Cheats and ISP User Name, I have always been able to navigate the rest of the UI fine with a gamepad but since adding all the new custom path options that's no longer true I tried a few things with no luck so I added the scroll as a workaround, got a little carried away and added left stick to navigate round the UI, controller bumpers to switch between tabs and made it so you do not need to press a button to show a tabs content, these last three things are minor improvements but are not needed and do not fix anything just makes the UI a little smoother to navigate. As for flattened navigation I'm sure I just forgot to change it back after a earlier attempt and has now been reverted, the UWP specific code was mainly to get the keyboard to open and actually type as well as close properly without reopening, this took me a few attempts to get right and I do not have the means to test it on all platforms so I made it specific to UWP but maybe could be done differently/better? About testing on Android I do not really have a sufficient device but could make a build and get someone else to test it? |
|
I did some test on Xbox with the current
I'm still investigating to find out how these problems can be fixed. Navigation and scrolling problems are likely ImGui bugs or limitations but some work around is needed. |
|
I used some of your code to fix the on-screen keyboard problem: eab952f For the navigation issues, I got rid of list boxes and replaced them with a simple frame. No more child windows = no more nav problems. I don't think anything else is needed for these issues. What remains is the tab navigation with triggers feature so if you want to rebase this PR and remove everything else, I'll merge it. |
This pull request introduces several improvements to gamepad navigation and on-screen keyboard handling. The changes improve controller navigation in settings, add support for shoulder bumpers, refine analog stick handling, and ensure better integration with on-screen keyboards.