MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / BeginPopup

Method BeginPopup

KBotExt/imgui/imgui.cpp:10485–10496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10483}
10484
10485bool ImGui::BeginPopup(const char* str_id, ImGuiWindowFlags flags)
10486{
10487 ImGuiContext& g = *GImGui;
10488 if (g.OpenPopupStack.Size <= g.BeginPopupStack.Size) // Early out for performance
10489 {
10490 g.NextWindowData.ClearFlags(); // We behave like Begin() and need to consume those values
10491 return false;
10492 }
10493 flags |= ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoSavedSettings;
10494 ImGuiID id = g.CurrentWindow->GetID(str_id);
10495 return BeginPopupEx(id, flags);
10496}
10497
10498// If 'p_open' is specified for a modal popup window, the popup will have a regular close button which will close the popup.
10499// Note that popup visibility status is owned by Dear ImGui (and manipulated with e.g. OpenPopup) so the actual value of *p_open is meaningless here.

Callers

nothing calls this directly

Calls 2

GetIDMethod · 0.80
ClearFlagsMethod · 0.45

Tested by

no test coverage detected