MCPcopy Create free account
hub / github.com/Wemino/MarkerPatch / EndMainMenuBar

Method EndMainMenuBar

include/imgui/imgui_widgets.cpp:9304–9318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9302}
9303
9304void ImGui::EndMainMenuBar()
9305{
9306 ImGuiContext& g = *GImGui;
9307 IM_ASSERT_USER_ERROR_RET(g.CurrentWindow->DC.MenuBarAppending, "Calling EndMainMenuBar() not from a menu-bar!"); // Not technically testing that it is the main menu bar
9308
9309 EndMenuBar();
9310 g.CurrentWindow->Flags |= ImGuiWindowFlags_NoSavedSettings; // Restore _NoSavedSettings (#8356)
9311
9312 // When the user has left the menu layer (typically: closed menus through activation of an item), we restore focus to the previous window
9313 // FIXME: With this strategy we won't be able to restore a NULL focus.
9314 if (g.CurrentWindow == g.NavWindow && g.NavLayer == ImGuiNavLayer_Main && !g.NavAnyRequest && g.ActiveId == 0)
9315 FocusTopMostWindowUnderOne(g.NavWindow, NULL, NULL, ImGuiFocusRequestFlags_UnlessBelowModal | ImGuiFocusRequestFlags_RestoreFocusedChild);
9316
9317 End();
9318}
9319
9320static bool IsRootOfOpenMenuSet()
9321{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected