You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default Dear ImGUI allows any window to dock inside any other window. How can I disable docking inside one (or all windows)? What I'd like to achieve, is to allow windows to dock inside the main viewport, but NOT inside each other.
The ImGuiWindowFlags_NoDocking disables docking for a window entirely.
How can I allow a window to be able to dock, but NOT allow any window to dock inside it?
The text was updated successfully, but these errors were encountered:
I can't think of any benefit from disabling the possibility to dock in secondary viewports. If you yourself don't like it, you can just not use this optional functionality. But why would you want to take that away from the users of your application?
As far as I know, limiting docking like that is currently not possible. You would have to alter ImGui sources for that. If you want to do that, look for calls to BeginDockableDragDropTarget() and make it depend on being in the main viewport.
"I can't think of any benefit from disabling the possibility to dock in secondary viewports."
It can be confusing to users if any window can be docked inside any other window. This is especially true if your users are less tech savvy.
I don't know of any app that allows unrestricted dock any window into any other window. For example, VS Code restricts where things can be dragged and dropped.
"As far as I know, limiting docking like that is currently not possible. You would have to alter ImGui sources for that."
It seems to be possible, albeit overly complicated: #3492
The solutions on that page use the unstable APIs inside imgui_internal.h. I was hoping that there would be a way that uses the stable API.
Version/Branch of Dear ImGui:
1.91.8-docking
Back-ends:
rlImGui
Compiler, OS:
Windows 10 + MSVC 2019
Full config/build information:
No response
Details:
By default Dear ImGUI allows any window to dock inside any other window. How can I disable docking inside one (or all windows)? What I'd like to achieve, is to allow windows to dock inside the main viewport, but NOT inside each other.
The ImGuiWindowFlags_NoDocking disables docking for a window entirely.
How can I allow a window to be able to dock, but NOT allow any window to dock inside it?
The text was updated successfully, but these errors were encountered: