-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Dock window on first open #4829
Comments
Hey @ocornut, I managed to implement a solution to this problem. I manually construct my dock nodes as such (ImGui v 1.89.5):
dock_id_left is set to 1, further along I create a window as such, asking it to dock to the left node from above on first use:
This works perfectly on first run. On second run, the saved window DockId is reset and the window is floating using the exact size and pos of the original dock node 1. Any ideas why the saved .ini DockId=0x00000001,0 for [Window][Entities] is reset on second launch? FYI if I dont set a condition and force the DockId every run, it is correctly docked on launch evert time:
|
UPDATE I am able to have the windows dock correctly on first run AND on successive runs they are not undocked and hovering with the same pos and size as above. This does mean that every single launch the layout is reset for the windows since this doesn't match the ImGuiCond_FirstUseEver functionality I'm looking for but it feels less buggy so will go with this for now. (ImGui v 1.89.5) |
Version/Branch of Dear ImGui:
Version: 1.86
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: webGL
Compiler: em++
Operating System: V8
My Issue/Question:
DockBuilder: #2109 (comment)
ImGuiCond: #2554 (comment)
How to use it together?
Example:
I have button 'open window_X' which sets window_X flag to true
I need to have window_X docked at the right side of my root docking space and use 20% of screen if it was opened for the first time
Just like ImGuiCond_FirstUseEver
So in my mind it will be:
or something like this
Are there any workarounds?
The text was updated successfully, but these errors were encountered: