| 8224 | } |
| 8225 | |
| 8226 | bool 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, |
nothing calls this directly
no test coverage detected