MCPcopy Create free account
hub / github.com/RenderKit/embree / NavUpdateWindowingOverlay

Method NavUpdateWindowingOverlay

tutorials/common/imgui/imgui.cpp:11689–11717  ·  view source on GitHub ↗

Overlay displayed when using CTRL+TAB. Called by EndFrame().

Source from the content-addressed store, hash-verified

11687
11688// Overlay displayed when using CTRL+TAB. Called by EndFrame().
11689void ImGui::NavUpdateWindowingOverlay()
11690{
11691 ImGuiContext& g = *GImGui;
11692 IM_ASSERT(g.NavWindowingTarget != NULL);
11693
11694 if (g.NavWindowingTimer < NAV_WINDOWING_LIST_APPEAR_DELAY)
11695 return;
11696
11697 if (g.NavWindowingListWindow == NULL)
11698 g.NavWindowingListWindow = FindWindowByName("###NavWindowingList");
11699 const ImGuiViewport* viewport = GetMainViewport();
11700 SetNextWindowSizeConstraints(ImVec2(viewport->Size.x * 0.20f, viewport->Size.y * 0.20f), ImVec2(FLT_MAX, FLT_MAX));
11701 SetNextWindowPos(viewport->GetCenter(), ImGuiCond_Always, ImVec2(0.5f, 0.5f));
11702 PushStyleVar(ImGuiStyleVar_WindowPadding, g.Style.WindowPadding * 2.0f);
11703 Begin("###NavWindowingList", NULL, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoSavedSettings);
11704 for (int n = g.WindowsFocusOrder.Size - 1; n >= 0; n--)
11705 {
11706 ImGuiWindow* window = g.WindowsFocusOrder[n];
11707 IM_ASSERT(window != NULL); // Fix static analyzers
11708 if (!IsWindowNavFocusable(window))
11709 continue;
11710 const char* label = window->Name;
11711 if (label == FindRenderedTextEnd(label))
11712 label = GetFallbackWindowNameForWindowingList(window);
11713 Selectable(label, g.NavWindowingTarget == window);
11714 }
11715 End();
11716 PopStyleVar();
11717}
11718
11719
11720//-----------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 3

ImVec2Function · 0.85
GetCenterMethod · 0.80

Tested by

no test coverage detected