mirror of
https://github.com/ocornut/imgui.git
synced 2026-09-20 18:23:46 +08:00
Docking: Internals: Transitioning some code toward consistently using ImGuiContext* ctx parameter instead of ImGuiDockContext
This commit is contained in:
+8
-8
@@ -1460,14 +1460,14 @@ namespace ImGui
|
||||
inline bool IsNavInputPressedAnyOfTwo(ImGuiNavInput n1, ImGuiNavInput n2, ImGuiInputReadMode mode) { return (GetNavInputAmount(n1, mode) + GetNavInputAmount(n2, mode)) > 0.0f; }
|
||||
|
||||
// Docking
|
||||
IMGUI_API void DockContextInitialize(ImGuiContext* imgui_context);
|
||||
IMGUI_API void DockContextShutdown(ImGuiContext* imgui_context);
|
||||
IMGUI_API void DockContextOnLoadSettings();
|
||||
IMGUI_API void DockContextRebuild(ImGuiDockContext* ctx);
|
||||
IMGUI_API void DockContextNewFrameUpdateUndocking(ImGuiDockContext* ctx);
|
||||
IMGUI_API void DockContextNewFrameUpdateDocking(ImGuiDockContext* ctx);
|
||||
IMGUI_API void DockContextEndFrame(ImGuiDockContext* ctx);
|
||||
IMGUI_API void DockContextQueueUndock(ImGuiDockContext* ctx, ImGuiWindow* window);
|
||||
IMGUI_API void DockContextInitialize(ImGuiContext* ctx);
|
||||
IMGUI_API void DockContextShutdown(ImGuiContext* ctx);
|
||||
IMGUI_API void DockContextOnLoadSettings(ImGuiContext* ctx);
|
||||
IMGUI_API void DockContextRebuild(ImGuiContext* ctx);
|
||||
IMGUI_API void DockContextNewFrameUpdateUndocking(ImGuiContext* ctx);
|
||||
IMGUI_API void DockContextNewFrameUpdateDocking(ImGuiContext* ctx);
|
||||
IMGUI_API void DockContextEndFrame(ImGuiContext* ctx);
|
||||
IMGUI_API void DockContextQueueUndock(ImGuiContext* ctx, ImGuiWindow* window);
|
||||
IMGUI_API void BeginDocked(ImGuiWindow* window, bool* p_open);
|
||||
IMGUI_API void BeginAsDockableDragDropSource(ImGuiWindow* window);
|
||||
IMGUI_API void BeginAsDockableDragDropTarget(ImGuiWindow* window);
|
||||
|
||||
+1
-2
@@ -6455,8 +6455,7 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
|
||||
// Undock
|
||||
if (undocking_tab && g.ActiveId == id && IsMouseDragging())
|
||||
{
|
||||
ImGuiDockContext* ctx = g.DockContext;
|
||||
DockContextQueueUndock(ctx, docked_window);
|
||||
DockContextQueueUndock(&g, docked_window);
|
||||
g.MovingWindow = docked_window;
|
||||
g.ActiveId = g.MovingWindow->MoveId;
|
||||
g.ActiveIdClickOffset -= g.MovingWindow->Pos - bb.Min;
|
||||
|
||||
Reference in New Issue
Block a user