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

Method IsWindowAbove

KBotExt/imgui/imgui.cpp:7268–7286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7266}
7267
7268bool ImGui::IsWindowAbove(ImGuiWindow* potential_above, ImGuiWindow* potential_below)
7269{
7270 ImGuiContext& g = *GImGui;
7271
7272 // It would be saner to ensure that display layer is always reflected in the g.Windows[] order, which would likely requires altering all manipulations of that array
7273 const int display_layer_delta = GetWindowDisplayLayer(potential_above) - GetWindowDisplayLayer(potential_below);
7274 if (display_layer_delta != 0)
7275 return display_layer_delta > 0;
7276
7277 for (int i = g.Windows.Size - 1; i >= 0; i--)
7278 {
7279 ImGuiWindow* candidate_window = g.Windows[i];
7280 if (candidate_window == potential_above)
7281 return true;
7282 if (candidate_window == potential_below)
7283 return false;
7284 }
7285 return false;
7286}
7287
7288bool ImGui::IsWindowHovered(ImGuiHoveredFlags flags)
7289{

Callers

nothing calls this directly

Calls 1

GetWindowDisplayLayerFunction · 0.85

Tested by

no test coverage detected