| 7342 | } |
| 7343 | |
| 7344 | bool ImGui::IsWindowAbove(ImGuiWindow* potential_above, ImGuiWindow* potential_below) |
| 7345 | { |
| 7346 | ImGuiContext& g = *GImGui; |
| 7347 | |
| 7348 | // 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 |
| 7349 | const int display_layer_delta = GetWindowDisplayLayer(potential_above) - GetWindowDisplayLayer(potential_below); |
| 7350 | if (display_layer_delta != 0) |
| 7351 | return display_layer_delta > 0; |
| 7352 | |
| 7353 | for (int i = g.Windows.Size - 1; i >= 0; i--) |
| 7354 | { |
| 7355 | ImGuiWindow* candidate_window = g.Windows[i]; |
| 7356 | if (candidate_window == potential_above) |
| 7357 | return true; |
| 7358 | if (candidate_window == potential_below) |
| 7359 | return false; |
| 7360 | } |
| 7361 | return false; |
| 7362 | } |
| 7363 | |
| 7364 | bool ImGui::IsWindowHovered(ImGuiHoveredFlags flags) |
| 7365 | { |
nothing calls this directly
no test coverage detected