MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / IsWindowAbove

Method IsWindowAbove

extern/imgui/imgui.cpp:7960–7978  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7958}
7959
7960bool ImGui::IsWindowAbove(ImGuiWindow* potential_above, ImGuiWindow* potential_below)
7961{
7962 ImGuiContext& g = *GImGui;
7963
7964 // 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
7965 const int display_layer_delta = GetWindowDisplayLayer(potential_above) - GetWindowDisplayLayer(potential_below);
7966 if (display_layer_delta != 0)
7967 return display_layer_delta > 0;
7968
7969 for (int i = g.Windows.Size - 1; i >= 0; i--)
7970 {
7971 ImGuiWindow* candidate_window = g.Windows[i];
7972 if (candidate_window == potential_above)
7973 return true;
7974 if (candidate_window == potential_below)
7975 return false;
7976 }
7977 return false;
7978}
7979
7980bool ImGui::IsWindowHovered(ImGuiHoveredFlags flags)
7981{

Callers

nothing calls this directly

Calls 1

GetWindowDisplayLayerFunction · 0.85

Tested by

no test coverage detected