MCPcopy Create free account
hub / github.com/cinder/Cinder / IsWindowAbove

Method IsWindowAbove

src/imgui/imgui.cpp:8226–8244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8224}
8225
8226bool ImGui::IsWindowAbove(ImGuiWindow* potential_above, ImGuiWindow* potential_below)
8227{
8228 ImGuiContext& g = *GImGui;
8229
8230 // 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
8231 const int display_layer_delta = GetWindowDisplayLayer(potential_above) - GetWindowDisplayLayer(potential_below);
8232 if (display_layer_delta != 0)
8233 return display_layer_delta > 0;
8234
8235 for (int i = g.Windows.Size - 1; i >= 0; i--)
8236 {
8237 ImGuiWindow* candidate_window = g.Windows[i];
8238 if (candidate_window == potential_above)
8239 return true;
8240 if (candidate_window == potential_below)
8241 return false;
8242 }
8243 return false;
8244}
8245
8246// Is current window hovered and hoverable (e.g. not blocked by a popup/modal)? See ImGuiHoveredFlags_ for options.
8247// IMPORTANT: If you are trying to check whether your mouse should be dispatched to Dear ImGui or to your underlying app,

Callers

nothing calls this directly

Calls 1

GetWindowDisplayLayerFunction · 0.85

Tested by

no test coverage detected