-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
How to make tabbing between InputText wrap the whole window, instead of only visible screen #4449
Comments
InputField
s wrap the whole window, instead of only visible screenInputText
s wrap the whole window, instead of only visible screen
I did some preliminary work on this in April, the problem is discussed here: I don’t have a simple answer to guide you through implementing it, if it was simple it would be fixed yet. Need a slight refactor of Nav process to sync scrolling to it. Lots of similar issues may be solved together after we move in that direction. |
InputText
s wrap the whole window, instead of only visible screen
I almost got this working right but right using a ImGuiListClipper messes it up so I am investigating another way to solve this. |
This is now fixed by 1a7526d, tabbing now cycle through clipped INPUTABLE items and apply scrolling properly. This is the result of a long sequence of yak-shaving, scattered over past few months (among many other work of course). The next step - and things have been reasonably prepared for that - it to allow cycling through any kind of items including non-inputable, aka #3092, and generalize the use of space/enter for activation. This tend to be a matter of seeing how the different features/idioms of navigation (other than directional arrows) are ready to be used more. (#787) |
…ling, using nav queries. (ocornut#4449) Not using counter/modulo anymore and special provisions to handle tab wrapping with ImGuiListClipper. Wrapping may be done better as a next-frame forwarded request. Also one extra step toward ocornut#3949 ocornut#3985
…attened flag. (ocornut#4449) Amend 1a7526d
…w when calling SetKeyboardFocusHere() and simultaneous changing window focus. (#4449)
Version/Branch of Dear ImGui:
Version: 1.84 (WIP) - f99fe72
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_sdl.cpp + imgui_impl_opengl3.cpp (using GLEW)
My Issue/Question:
I have spent a couple days trying to get tabbing between
InputText
s working, without only wrapping around the visual screen area. I have looked through the demo, along with many github issues, but every issue that I find isn't related to my issue, or is very old and not really applicable.To further elaborate on what I mean, when you have multiple
InputText
s, with some of them scrolled offscreen, tabbing will loop around and focus on only the ones visible to the user. What I am trying to accomplish is having it wrap around all of theInputText
s in the current window, whilst scrolling to whichever one it activates. I have accomplished scrolling to the input text currently activated by doing this:However, this does not solve anything when trying to tab from the bottom back to the very top, along with shift-tabbing from the top to the very bottom (or if two or more of the text fields aren't simultaneously visible at any given time).
I have also tried to partially override this "wrapping" by using a combination of
ImGui::IsKeyPressedMap(ImGuiKey_Tab)
,ImGui::PushAllowKeyboardFocus(...)
, andImGui::SetKeyboardFocusHere()
, but have found it quite difficult to interface this properly with howInputText
s work, due to how much it does/handles.Is there any way to do what I am asking for? If not, has anyone already made a custom solution to this? Any help in guiding me in the right direction would be greatly appreciated!
The text was updated successfully, but these errors were encountered: