From e4acc91f56d9d88b75f60a23bd9662804d7c54b7 Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Mon, 23 Jan 2023 23:57:37 -0500 Subject: selection upgrade wip --- src/imgui_helper_internal.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/imgui_helper_internal.cpp') diff --git a/src/imgui_helper_internal.cpp b/src/imgui_helper_internal.cpp index 7d6944b..da94586 100644 --- a/src/imgui_helper_internal.cpp +++ b/src/imgui_helper_internal.cpp @@ -11,7 +11,7 @@ #include "imgui_internal.h" // NOTE(fox): This API will change in the future! -void ImGui::MyWindowSetup(ImGuiID id) +void ImGui::MyWindowSetup(ImGuiID *Placement, ImGuiID id) { ImGuiViewport *Viewport = GetMainViewport(); ImVec2 WindowMin = Viewport->WorkPos; @@ -22,24 +22,30 @@ void ImGui::MyWindowSetup(ImGuiID id) DockBuilderSetNodeSize(id, WindowSize); DockBuilderSetNodePos(id, WindowMin); + ImGuiID *DockRight = Placement; ImGuiID DockTop = ImGui::DockBuilderSplitNode(id, ImGuiDir_Down, 1.f, nullptr, &id); ImGuiID DockBottom = ImGui::DockBuilderSplitNode(DockTop, ImGuiDir_Down, 0.4f, nullptr, &DockTop); ImGuiID DockLeft = ImGui::DockBuilderSplitNode(DockTop, ImGuiDir_Left, 0.15f, nullptr, &DockTop); - ImGuiID DockRight = ImGui::DockBuilderSplitNode(DockTop, ImGuiDir_Right, 0.2f, nullptr, &DockTop); - ImGuiID DockRightBottom = ImGui::DockBuilderSplitNode(DockRight, ImGuiDir_Down, 0.2f, nullptr, &DockRight); - ImGuiID DockRightTop = ImGui::DockBuilderSplitNode(DockRight, ImGuiDir_Up, 0.6f, nullptr, &DockRight); + *DockRight = ImGui::DockBuilderSplitNode(DockTop, ImGuiDir_Right, 0.2f, nullptr, &DockTop); + ImGuiID DockRightBottom = ImGui::DockBuilderSplitNode(*DockRight, ImGuiDir_Down, 0.2f, nullptr, DockRight); + ImGuiID DockRightTop = ImGui::DockBuilderSplitNode(*DockRight, ImGuiDir_Up, 0.6f, nullptr, DockRight); ImGui::DockBuilderDockWindow("Menu", id); ImGui::DockBuilderDockWindow("Viewport", DockTop); ImGui::DockBuilderDockWindow("Timeline", DockBottom); ImGui::DockBuilderDockWindow("Properties###Properties", DockLeft); ImGui::DockBuilderDockWindow("Colors", DockRightTop); - ImGui::DockBuilderDockWindow("Files", DockRight); + ImGui::DockBuilderDockWindow("Files", *DockRight); ImGui::DockBuilderDockWindow("Effects list", DockRightBottom); ImGui::DockBuilderFinish(id); } +void ImGui::MyDockWindow(char *Window, ImGuiID Dock) +{ + ImGui::DockBuilderDockWindow(Window, Dock); +} + // A modded version of ScalarSlider allowing for the minimum and maximum parts // of the slider to be draggable by two other buttons. p_mid is from range -1 // to 1, and s_min and max are from 0-1. -- cgit v1.2.3