| 12411 | } |
| 12412 | |
| 12413 | bool ImGui::BeginPopupMenuEx(ImGuiID id, const char* label, ImGuiWindowFlags extra_window_flags) |
| 12414 | { |
| 12415 | ImGuiContext& g = *GImGui; |
| 12416 | if (!IsPopupOpen(id, ImGuiPopupFlags_None)) |
| 12417 | { |
| 12418 | g.NextWindowData.ClearFlags(); // We behave like Begin() and need to consume those values |
| 12419 | return false; |
| 12420 | } |
| 12421 | |
| 12422 | char name[128]; |
| 12423 | IM_ASSERT(extra_window_flags & ImGuiWindowFlags_ChildMenu); |
| 12424 | ImFormatString(name, IM_ARRAYSIZE(name), "%s###Menu_%02d", label, g.BeginMenuDepth); // Recycle windows based on depth |
| 12425 | bool is_open = Begin(name, NULL, extra_window_flags | ImGuiWindowFlags_Popup); |
| 12426 | if (!is_open) // NB: Begin can return false when the popup is completely clipped (e.g. zero size display) |
| 12427 | EndPopup(); |
| 12428 | //g.CurrentWindow->FocusRouteParentWindow = g.CurrentWindow->ParentWindowInBeginStack; |
| 12429 | return is_open; |
| 12430 | } |
| 12431 | |
| 12432 | bool ImGui::BeginPopup(const char* str_id, ImGuiWindowFlags flags) |
| 12433 | { |
nothing calls this directly
no test coverage detected