diff options
Diffstat (limited to 'src/ui/ui_layer.cpp')
| -rw-r--r-- | src/ui/ui_layer.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/ui/ui_layer.cpp b/src/ui/ui_layer.cpp index 88e1b1d..dc61d2d 100644 --- a/src/ui/ui_layer.cpp +++ b/src/ui/ui_layer.cpp @@ -16,7 +16,7 @@ namespace Donut { - // Panel window titles. These are the identity DockBuilder docks against, so + // panel window titles. these are the identity DockBuilder docks against, so // they must match the ImGui::Begin() titles exactly. static const char* kOutliner = "Outliner"; static const char* kProperties = "Properties"; @@ -25,7 +25,7 @@ namespace Donut static const char* kExport = "Export"; static const char* kStats = "Stats"; - // One-time ImGui theme: rounded, roomy, dark with a warm accretion-disk accent. + // one-time ImGui theme: rounded, roomy, dark with a warm accretion-disk accent. static auto apply_donut_style() -> void { ImGuiStyle& s = ImGui::GetStyle(); @@ -76,13 +76,13 @@ namespace Donut draw_menu_bar(ctx); - // Full-viewport dock space with a pass-through centre: panels dock to the - // edges while the render shows through the middle. Sits under the menu bar. + // full-viewport dock space with a pass-through centre: panels dock to the + // edges while the render shows through the middle. sits under the menu bar. // ImGui owns the id (stable per viewport) and persists the layout in imgui.ini. const ImGuiID dockspace_id = ImGui::DockSpaceOverViewport( 0, ImGui::GetMainViewport(), ImGuiDockNodeFlags_PassthruCentralNode); - // On the first frame, seed a default layout unless imgui.ini restored one + // on the first frame, seed a default layout unless imgui.ini restored one // (a restored dock tree has splits/windows, so the root node isn't empty). if (m_first_frame) { @@ -143,7 +143,7 @@ namespace Donut ImGui::EndMenu(); } - // Right-aligned mode + FPS readout. + // right-aligned mode + FPS readout. char status[64]; std::snprintf(status, sizeof(status), "%s %.0f FPS", m_mode == Mode::Scene ? "Scene" : "Simulation", ImGui::GetIO().Framerate); @@ -154,13 +154,13 @@ namespace Donut ImGui::EndMainMenuBar(); } - // Rebuild the dock tree for the current layout. Windows named but not currently + // rebuild the dock tree for the current layout. windows named but not currently // visible still get a dock home here, so toggling them on lands them sensibly. auto UILayer::build_layout(unsigned int dockspace_id) -> void { ImGui::DockBuilderRemoveNode(dockspace_id); - // DockSpace is a private flag, PassthruCentralNode a public one; combine as - // int to avoid the C++20 mixed-enum bitwise-or warning. + // DockSpace is a private flag and PassthruCentralNode a public one, and + // C++20 whines about OR-ing two different enum types, so cast to int and move on. ImGui::DockBuilderAddNode(dockspace_id, (int)ImGuiDockNodeFlags_DockSpace | (int)ImGuiDockNodeFlags_PassthruCentralNode); ImGui::DockBuilderSetNodeSize(dockspace_id, ImGui::GetMainViewport()->WorkSize); @@ -215,7 +215,7 @@ namespace Donut ImGui::DockBuilderFinish(dockspace_id); } - // Apply a preset: set the centre view, choose which panels are visible, and + // apply a preset: set the centre view, choose which panels are visible, and // request a dock-tree rebuild next frame. auto UILayer::apply_layout(Layout layout) -> void { @@ -314,8 +314,8 @@ namespace Donut if (m_mode == Mode::Scene) { - // Viewport gizmo for the selected sphere, using the scene camera - // (its projection was set for this frame by the Application). Drawn + // viewport gizmo for the selected sphere, using the scene camera + // (its projection was set for this frame by the Application). drawn // into the background list so it sits over the render, under panels. ImGuizmo::SetOrthographic(false); ImGuizmo::SetDrawlist(ImGui::GetBackgroundDrawList()); |
