mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 03:58:47 +02:00
Internals: Added FindWindowByID() helper. (#2190)
This commit is contained in:
@ -4220,13 +4220,18 @@ static void SetWindowConditionAllowFlags(ImGuiWindow* window, ImGuiCond flags, b
|
||||
window->SetWindowCollapsedAllowFlags = enabled ? (window->SetWindowCollapsedAllowFlags | flags) : (window->SetWindowCollapsedAllowFlags & ~flags);
|
||||
}
|
||||
|
||||
ImGuiWindow* ImGui::FindWindowByName(const char* name)
|
||||
ImGuiWindow* ImGui::FindWindowByID(ImGuiID id)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiID id = ImHash(name, 0);
|
||||
return (ImGuiWindow*)g.WindowsById.GetVoidPtr(id);
|
||||
}
|
||||
|
||||
ImGuiWindow* ImGui::FindWindowByName(const char* name)
|
||||
{
|
||||
ImGuiID id = ImHash(name, 0);
|
||||
return FindWindowByID(id);
|
||||
}
|
||||
|
||||
static ImGuiWindow* CreateNewWindow(const char* name, ImVec2 size, ImGuiWindowFlags flags)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
|
Reference in New Issue
Block a user