summaryrefslogtreecommitdiff
path: root/src/imgui_helper_internal.cpp
diff options
context:
space:
mode:
authorFox Caminiti <fox@foxcam.net>2023-01-23 23:57:37 -0500
committerFox Caminiti <fox@foxcam.net>2023-01-23 23:57:37 -0500
commite4acc91f56d9d88b75f60a23bd9662804d7c54b7 (patch)
treee0a30356d078557cf18417082dc0122c6fd4c171 /src/imgui_helper_internal.cpp
parent6298837d4b5fbff561e3d7e6a3361bd64e432960 (diff)
selection upgrade wip
Diffstat (limited to 'src/imgui_helper_internal.cpp')
-rw-r--r--src/imgui_helper_internal.cpp16
1 files changed, 11 insertions, 5 deletions
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.