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

Method IsWindowAbove

tutorials/common/imgui/imgui.cpp:7344–7362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7342}
7343
7344bool ImGui::IsWindowAbove(ImGuiWindow* potential_above, ImGuiWindow* potential_below)
7345{
7346 ImGuiContext& g = *GImGui;
7347
7348 // 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
7349 const int display_layer_delta = GetWindowDisplayLayer(potential_above) - GetWindowDisplayLayer(potential_below);
7350 if (display_layer_delta != 0)
7351 return display_layer_delta > 0;
7352
7353 for (int i = g.Windows.Size - 1; i >= 0; i--)
7354 {
7355 ImGuiWindow* candidate_window = g.Windows[i];
7356 if (candidate_window == potential_above)
7357 return true;
7358 if (candidate_window == potential_below)
7359 return false;
7360 }
7361 return false;
7362}
7363
7364bool ImGui::IsWindowHovered(ImGuiHoveredFlags flags)
7365{

Callers

nothing calls this directly

Calls 1

GetWindowDisplayLayerFunction · 0.85

Tested by

no test coverage detected