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

Method IsWindowFocused

KBotExt/imgui/imgui.cpp:7333–7353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7331}
7332
7333bool ImGui::IsWindowFocused(ImGuiFocusedFlags flags)
7334{
7335 ImGuiContext& g = *GImGui;
7336 ImGuiWindow* ref_window = g.NavWindow;
7337 ImGuiWindow* cur_window = g.CurrentWindow;
7338
7339 if (ref_window == NULL)
7340 return false;
7341 if (flags & ImGuiFocusedFlags_AnyWindow)
7342 return true;
7343
7344 IM_ASSERT(cur_window); // Not inside a Begin()/End()
7345 const bool popup_hierarchy = (flags & ImGuiFocusedFlags_NoPopupHierarchy) == 0;
7346 if (flags & ImGuiHoveredFlags_RootWindow)
7347 cur_window = GetCombinedRootWindow(cur_window, popup_hierarchy);
7348
7349 if (flags & ImGuiHoveredFlags_ChildWindows)
7350 return IsWindowChildOf(ref_window, cur_window, popup_hierarchy);
7351 else
7352 return (ref_window == cur_window);
7353}
7354
7355// Can we focus this window with CTRL+TAB (or PadMenu + PadFocusPrev/PadFocusNext)
7356// Note that NoNavFocus makes the window not reachable with CTRL+TAB but it can still be focused with mouse or programmatically.

Callers

nothing calls this directly

Calls 1

GetCombinedRootWindowFunction · 0.85

Tested by

no test coverage detected