MCPcopy Create free account
hub / github.com/BoomingTech/Piccolo / IsWindowAbove

Method IsWindowAbove

engine/3rdparty/imgui/imgui.cpp:7445–7463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7443}
7444
7445bool ImGui::IsWindowAbove(ImGuiWindow* potential_above, ImGuiWindow* potential_below)
7446{
7447 ImGuiContext& g = *GImGui;
7448
7449 // 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
7450 const int display_layer_delta = GetWindowDisplayLayer(potential_above) - GetWindowDisplayLayer(potential_below);
7451 if (display_layer_delta != 0)
7452 return display_layer_delta > 0;
7453
7454 for (int i = g.Windows.Size - 1; i >= 0; i--)
7455 {
7456 ImGuiWindow* candidate_window = g.Windows[i];
7457 if (candidate_window == potential_above)
7458 return true;
7459 if (candidate_window == potential_below)
7460 return false;
7461 }
7462 return false;
7463}
7464
7465bool ImGui::IsWindowHovered(ImGuiHoveredFlags flags)
7466{

Callers

nothing calls this directly

Calls 1

GetWindowDisplayLayerFunction · 0.85

Tested by

no test coverage detected