-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Jumping the user to a different part of the GUI #7583
Comments
Before calling |
It's not a trivial problem to solve in a generic manner here, as they are many variations of desired behavior and/or things are implemented. (1) You ought to focus the window: (2) As for the tree open-state itself, depending on how you store your focus request (as a path?), if you can compute their ImGuiID you might access the storage directly ( (3) And you want to see scrolling for which you can use Other notes:
|
Thank you folks! A combo of SetWindowFocus(name) and SetNextItemOpen seemed to work. Luckily my code is mostly autogenerated, so I only had to add it to two places to work everywhere. (SetNextWindowFocus didn't seem to work, maybe because I was attempting to focus the same frame that I was adding new windows) |
Version/Branch of Dear ImGui:
1.90.1
Back-ends:
Psydack's UImGui port v4.1.0
Compiler, OS:
Windows 10, Unity 2023.2.13
Full config/build information:
No response
Details:
I have multiple windows started with Begin, each with CollapsingHeaders, each of those with some TreeNodes. Often the windows are all tabbed together but they might not be.
At certain points in the application I'd like to be able to bring a particular window to the front, and unfold headers/trees down to a particular point.
I saw SetKeyboardFocusHere, but if my window isn't even rendering, I am not running the subtree that needs to own the focus to call it.
do I have to do something like
if (ImGui::Begin("window") || IsPartOfFocusTree("window"))
in every part of my code?Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
No response
The text was updated successfully, but these errors were encountered: