1.7 KiB
1.7 KiB
Why
All ImGui windows are fixed-position, fixed-size, and non-dockable, forcing users into a rigid layout that cannot adapt to different screen sizes, workflows, or preferences. Enabling ImGui's built-in docking system allows users to freely arrange, resize, tab, and float panels to suit their workflow — a critical UX feature for any editor application.
What Changes
- Enable ImGui docking by defining
IMGUI_HAS_DOCKat compile time via CMake - Set
ImGuiConfigFlags_DockingEnablein the ImGui IO config flags - Create a full-window dockspace in the main render loop
- Replace hardcoded
SetNextWindowPos/SetNextWindowSizecalls with dockable window creation - Remove manual positioning logic for all panels (Scene Hierarchy, Layer Panel, Viewport, Property Panel, Stage Info)
- Preserve window visibility toggles (Stage Info, Demo Window) via the View menu
- Ensure dock layout persists across sessions via
imgui.ini
Capabilities
New Capabilities
imgui-docking: Main application dock space with draggable, resizable, and tabbable panels. Includes compile-time docking enablement, runtime dockspace creation, and panel migration from fixed-position to dock-based layout.
Modified Capabilities
Impact
- CMake:
FindImgui.cmake— addIMGUI_HAS_DOCKcompile definition - imconfig.h: May need to ensure docking macros are uncommented (or rely on CMake define)
- ImGuiContext.cpp: Add
ImGuiConfigFlags_DockingEnableto IO config flags inInitialize() - Application.cpp: Add dockspace creation at the start of
RenderUI(), remove allSetNextWindowPos/SetNextWindowSizecalls from panel rendering - All panel windows: No API changes — windows remain compatible with docking as-is