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

Method NavUpdateWindowingOverlay

KBotExt/imgui/imgui.cpp:12259–12287  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

12257
12258// Overlay displayed when using CTRL+TAB. Called by EndFrame().
12259void ImGui::NavUpdateWindowingOverlay()
12260{
12261 ImGuiContext& g = *GImGui;
12262 IM_ASSERT(g.NavWindowingTarget != NULL);
12263
12264 if (g.NavWindowingTimer < NAV_WINDOWING_LIST_APPEAR_DELAY)
12265 return;
12266
12267 if (g.NavWindowingListWindow == NULL)
12268 g.NavWindowingListWindow = FindWindowByName("###NavWindowingList");
12269 const ImGuiViewport* viewport = GetMainViewport();
12270 SetNextWindowSizeConstraints(ImVec2(viewport->Size.x * 0.20f, viewport->Size.y * 0.20f), ImVec2(FLT_MAX, FLT_MAX));
12271 SetNextWindowPos(viewport->GetCenter(), ImGuiCond_Always, ImVec2(0.5f, 0.5f));
12272 PushStyleVar(ImGuiStyleVar_WindowPadding, g.Style.WindowPadding * 2.0f);
12273 Begin("###NavWindowingList", NULL, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoSavedSettings);
12274 for (int n = g.WindowsFocusOrder.Size - 1; n >= 0; n--)
12275 {
12276 ImGuiWindow* window = g.WindowsFocusOrder[n];
12277 IM_ASSERT(window != NULL); // Fix static analyzers
12278 if (!IsWindowNavFocusable(window))
12279 continue;
12280 const char* label = window->Name;
12281 if (label == FindRenderedTextEnd(label))
12282 label = GetFallbackWindowNameForWindowingList(window);
12283 Selectable(label, g.NavWindowingTarget == window);
12284 }
12285 End();
12286 PopStyleVar();
12287}
12288
12289//-----------------------------------------------------------------------------
12290// [SECTION] DRAG AND DROP

Callers

nothing calls this directly

Calls 3

ImVec2Function · 0.85
GetCenterMethod · 0.80

Tested by

no test coverage detected