31 lines
1.7 KiB
Markdown
31 lines
1.7 KiB
Markdown
## 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_DOCK` at compile time via CMake
|
|
- Set `ImGuiConfigFlags_DockingEnable` in the ImGui IO config flags
|
|
- Create a full-window dockspace in the main render loop
|
|
- Replace hardcoded `SetNextWindowPos`/`SetNextWindowSize` calls 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
|
|
|
|
<!-- No existing specs to modify -->
|
|
|
|
## Impact
|
|
|
|
- **CMake**: `FindImgui.cmake` — add `IMGUI_HAS_DOCK` compile definition
|
|
- **imconfig.h**: May need to ensure docking macros are uncommented (or rely on CMake define)
|
|
- **ImGuiContext.cpp**: Add `ImGuiConfigFlags_DockingEnable` to IO config flags in `Initialize()`
|
|
- **Application.cpp**: Add dockspace creation at the start of `RenderUI()`, remove all `SetNextWindowPos`/`SetNextWindowSize` calls from panel rendering
|
|
- **All panel windows**: No API changes — windows remain compatible with docking as-is |