Docking: Renamed SetNextWindowId() -> SetNextWindowID() for consistency. (function vs member are still horribly inconsistent atm)

This commit is contained in:
omar 2019-01-02 18:56:53 +01:00
parent 4ea9fdbbea
commit 0d6e3ab2b0
3 changed files with 5 additions and 5 deletions

View File

@ -6263,7 +6263,7 @@ bool ImGui::IsWindowFocused(ImGuiFocusedFlags flags)
} }
} }
ImGuiID ImGui::GetWindowDockId() ImGuiID ImGui::GetWindowDockID()
{ {
ImGuiContext& g = *GImGui; ImGuiContext& g = *GImGui;
return g.CurrentWindow->DockId; return g.CurrentWindow->DockId;
@ -6524,7 +6524,7 @@ void ImGui::SetNextWindowViewport(ImGuiID id)
g.NextWindowData.ViewportId = id; g.NextWindowData.ViewportId = id;
} }
void ImGui::SetNextWindowDockId(ImGuiID id, ImGuiCond cond) void ImGui::SetNextWindowDockID(ImGuiID id, ImGuiCond cond)
{ {
ImGuiContext& g = *GImGui; ImGuiContext& g = *GImGui;
g.NextWindowData.DockCond = cond ? cond : ImGuiCond_Always; g.NextWindowData.DockCond = cond ? cond : ImGuiCond_Always;

View File

@ -580,9 +580,9 @@ namespace ImGui
// Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details. // Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details.
IMGUI_API void DockSpace(ImGuiID id, const ImVec2& size = ImVec2(0, 0), ImGuiDockNodeFlags flags = 0, const ImGuiWindowClass* window_class = NULL); IMGUI_API void DockSpace(ImGuiID id, const ImVec2& size = ImVec2(0, 0), ImGuiDockNodeFlags flags = 0, const ImGuiWindowClass* window_class = NULL);
IMGUI_API ImGuiID DockSpaceOverViewport(ImGuiViewport* viewport = NULL, ImGuiDockNodeFlags dockspace_flags = 0, const ImGuiWindowClass* window_class = NULL); IMGUI_API ImGuiID DockSpaceOverViewport(ImGuiViewport* viewport = NULL, ImGuiDockNodeFlags dockspace_flags = 0, const ImGuiWindowClass* window_class = NULL);
IMGUI_API void SetNextWindowDockId(ImGuiID dock_id, ImGuiCond cond = 0); // set next window dock id (FIXME-DOCK) IMGUI_API void SetNextWindowDockID(ImGuiID dock_id, ImGuiCond cond = 0); // set next window dock id (FIXME-DOCK)
IMGUI_API void SetNextWindowClass(const ImGuiWindowClass* window_class); // set next window class / user type (docking filters by same user_type) IMGUI_API void SetNextWindowClass(const ImGuiWindowClass* window_class); // set next window class / user type (docking filters by same user_type)
IMGUI_API ImGuiID GetWindowDockId(); IMGUI_API ImGuiID GetWindowDockID();
IMGUI_API bool IsWindowDocked(); // is current window docked into another window? IMGUI_API bool IsWindowDocked(); // is current window docked into another window?
// Logging/Capture // Logging/Capture

View File

@ -4275,7 +4275,7 @@ void ShowExampleAppDocuments(bool* p_open)
// FIXME-DOCK: SetNextWindowDock() // FIXME-DOCK: SetNextWindowDock()
//ImGuiID default_dock_id = GetDockspaceRootDocumentDockID(); //ImGuiID default_dock_id = GetDockspaceRootDocumentDockID();
//ImGuiID default_dock_id = GetDockspacePreferedDocumentDockID(); //ImGuiID default_dock_id = GetDockspacePreferedDocumentDockID();
ImGui::SetNextWindowDockId(dockspace_id, redock_all ? ImGuiCond_Always : ImGuiCond_FirstUseEver); ImGui::SetNextWindowDockID(dockspace_id, redock_all ? ImGuiCond_Always : ImGuiCond_FirstUseEver);
ImGuiWindowFlags window_flags = (doc->Dirty ? ImGuiWindowFlags_UnsavedDocument : 0); ImGuiWindowFlags window_flags = (doc->Dirty ? ImGuiWindowFlags_UnsavedDocument : 0);
bool visible = ImGui::Begin(doc->Name, &doc->Open, window_flags); bool visible = ImGui::Begin(doc->Name, &doc->Open, window_flags);