|
@@ -14730,13 +14730,13 @@ void ImGui::SetWindowDock(ImGuiWindow* window, ImGuiID dock_id, ImGuiCond cond)
|
|
|
// Create an explicit dockspace node within an existing window. Also expose dock node flags and creates a CentralNode by default.
|
|
|
// The Central Node is always displayed even when empty and shrink/extend according to the requested size of its neighbors.
|
|
|
// DockSpace() needs to be submitted _before_ any window they can host. If you use a dockspace, submit it early in your app.
|
|
|
-void ImGui::DockSpace(ImGuiID id, const ImVec2& size_arg, ImGuiDockNodeFlags flags, const ImGuiWindowClass* window_class)
|
|
|
+ImGuiID ImGui::DockSpace(ImGuiID id, const ImVec2& size_arg, ImGuiDockNodeFlags flags, const ImGuiWindowClass* window_class)
|
|
|
{
|
|
|
ImGuiContext* ctx = GImGui;
|
|
|
ImGuiContext& g = *ctx;
|
|
|
ImGuiWindow* window = GetCurrentWindow();
|
|
|
if (!(g.IO.ConfigFlags & ImGuiConfigFlags_DockingEnable))
|
|
|
- return;
|
|
|
+ return 0;
|
|
|
|
|
|
// Early out if parent window is hidden/collapsed
|
|
|
// This is faster but also DockNodeUpdateTabBar() relies on TabBarLayout() running (which won't if SkipItems=true) to set NextSelectedTabId = 0). See #2960.
|
|
@@ -14764,7 +14764,7 @@ void ImGui::DockSpace(ImGuiID id, const ImVec2& size_arg, ImGuiDockNodeFlags fla
|
|
|
{
|
|
|
IM_ASSERT(node->IsDockSpace() == false && "Cannot call DockSpace() twice a frame with the same ID");
|
|
|
node->LocalFlags |= ImGuiDockNodeFlags_DockSpace;
|
|
|
- return;
|
|
|
+ return id;
|
|
|
}
|
|
|
node->LocalFlags |= ImGuiDockNodeFlags_DockSpace;
|
|
|
|
|
@@ -14772,7 +14772,7 @@ void ImGui::DockSpace(ImGuiID id, const ImVec2& size_arg, ImGuiDockNodeFlags fla
|
|
|
if (flags & ImGuiDockNodeFlags_KeepAliveOnly)
|
|
|
{
|
|
|
node->LastFrameAlive = g.FrameCount;
|
|
|
- return;
|
|
|
+ return id;
|
|
|
}
|
|
|
|
|
|
const ImVec2 content_avail = GetContentRegionAvail();
|
|
@@ -14825,6 +14825,7 @@ void ImGui::DockSpace(ImGuiID id, const ImVec2& size_arg, ImGuiDockNodeFlags fla
|
|
|
|
|
|
End();
|
|
|
ItemSize(size);
|
|
|
+ return id;
|
|
|
}
|
|
|
|
|
|
// Tips: Use with ImGuiDockNodeFlags_PassthruCentralNode!
|