Internals: Added FindWindowByID() helper. (#2190)

This commit is contained in:
omar
2018-11-15 16:41:48 +01:00
parent aa668c410a
commit 6b4443755d
2 changed files with 8 additions and 2 deletions

View File

@ -1123,6 +1123,7 @@ namespace ImGui
// - You are calling ImGui functions after ImGui::EndFrame()/ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal.
inline ImGuiWindow* GetCurrentWindowRead() { ImGuiContext& g = *GImGui; return g.CurrentWindow; }
inline ImGuiWindow* GetCurrentWindow() { ImGuiContext& g = *GImGui; g.CurrentWindow->WriteAccessed = true; return g.CurrentWindow; }
IMGUI_API ImGuiWindow* FindWindowByID(ImGuiID id);
IMGUI_API ImGuiWindow* FindWindowByName(const char* name);
IMGUI_API void FocusWindow(ImGuiWindow* window);
IMGUI_API void FocusPreviousWindowIgnoringOne(ImGuiWindow* ignore_window);