| 7266 | } |
| 7267 | |
| 7268 | bool ImGui::IsWindowAbove(ImGuiWindow* potential_above, ImGuiWindow* potential_below) |
| 7269 | { |
| 7270 | ImGuiContext& g = *GImGui; |
| 7271 | |
| 7272 | // 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 |
| 7273 | const int display_layer_delta = GetWindowDisplayLayer(potential_above) - GetWindowDisplayLayer(potential_below); |
| 7274 | if (display_layer_delta != 0) |
| 7275 | return display_layer_delta > 0; |
| 7276 | |
| 7277 | for (int i = g.Windows.Size - 1; i >= 0; i--) |
| 7278 | { |
| 7279 | ImGuiWindow* candidate_window = g.Windows[i]; |
| 7280 | if (candidate_window == potential_above) |
| 7281 | return true; |
| 7282 | if (candidate_window == potential_below) |
| 7283 | return false; |
| 7284 | } |
| 7285 | return false; |
| 7286 | } |
| 7287 | |
| 7288 | bool ImGui::IsWindowHovered(ImGuiHoveredFlags flags) |
| 7289 | { |
nothing calls this directly
no test coverage detected