MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / IsWindowAbove

Method IsWindowAbove

plugins/Cardinal/src/DearImGui/imgui.cpp:6952–6970  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6950}
6951
6952bool ImGui::IsWindowAbove(ImGuiWindow* potential_above, ImGuiWindow* potential_below)
6953{
6954 ImGuiContext& g = *GImGui;
6955
6956 // 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
6957 const int display_layer_delta = GetWindowDisplayLayer(potential_above) - GetWindowDisplayLayer(potential_below);
6958 if (display_layer_delta != 0)
6959 return display_layer_delta > 0;
6960
6961 for (int i = g.Windows.Size - 1; i >= 0; i--)
6962 {
6963 ImGuiWindow* candidate_window = g.Windows[i];
6964 if (candidate_window == potential_above)
6965 return true;
6966 if (candidate_window == potential_below)
6967 return false;
6968 }
6969 return false;
6970}
6971
6972bool ImGui::IsWindowHovered(ImGuiHoveredFlags flags)
6973{

Callers

nothing calls this directly

Calls 1

GetWindowDisplayLayerFunction · 0.85

Tested by

no test coverage detected