Reputation: 41
Hello I'm creating my first Game Engine with C++ and OpenGL, along with ImGui for the editor interface. I have a simple question, I created a window that covers the whole screen using:
ImGuiWindowFlags flags = ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse;
ImGui::Begin("ImGUI window", NULL, flags);
ImGui::End();
I also have docking enabled, I want to create a bunch of smaller windows (like tab windows) to be dockable inside of that main window. I tried doing that by using the BeginChild function but, while it created a child window it wasn't moveable in any way. I also tried creating another window but, when it's docked on the main window it goes fullscreen. Does anybody have any idea how I can achieve a bunch of child windows that are dockable and can be moved around?
Upvotes: 2
Views: 1177
Reputation: 41
I figured out I can solve this by making the whole screen dockable:
// make the whole screen dockable
ImGui::DockSpaceOverViewport(ImGui::GetMainViewport(), ImGuiDockNodeFlags_PassthruCentralNode);
and then adding the windows.
Upvotes: 1