-
-
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
"Lock" current docked state of window #6780
Comments
This is an interesting question, which AFAIK hasn't been asked before in this form, and there's currently no single answer. I am assuming given your (incomplete) pasted bit that you know of way to apply those dock node flags.
Setting However with multiple windows docked in the same spot, using Setting ImGuIWindowFlags_NoMove on an individual window would also effectively prevent undocking. I think we are missing:
Also note the
This would also work but tends to be more tedious and will prevent users from reconfiguring things. |
Thanks for the quick reply - I updated my code to be a little more complete. I tried the |
Shift is necessary for docking but not for undocking with this option. |
I have now added a |
Having shift lock undocking solves my use case. Thank you! |
Version/Branch of Dear ImGui:
Version: 1.89.5
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler:
Operating System: Ubuntu 22.04
My Issue/Question:
Context: I am creating an app that has many windows and I am letting the user figure out best way to dock them. Their docking status and window sizes saved in the imgui.ini file which works great.
The problem is that I'm trying to add a check box which locks the window sizes AND their ability to be undocked.
Q1. To prevent the user from easily/accidentally undocking a window, can I disable this little triangle (or tab bar)?
Q2. Is there a better way to approach this problem? Should I be creating a dockspace and programmatically arranging the windows?
Screenshots/Video
The text was updated successfully, but these errors were encountered: