| 7443 | } |
| 7444 | |
| 7445 | bool ImGui::IsWindowAbove(ImGuiWindow* potential_above, ImGuiWindow* potential_below) |
| 7446 | { |
| 7447 | ImGuiContext& g = *GImGui; |
| 7448 | |
| 7449 | // 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 |
| 7450 | const int display_layer_delta = GetWindowDisplayLayer(potential_above) - GetWindowDisplayLayer(potential_below); |
| 7451 | if (display_layer_delta != 0) |
| 7452 | return display_layer_delta > 0; |
| 7453 | |
| 7454 | for (int i = g.Windows.Size - 1; i >= 0; i--) |
| 7455 | { |
| 7456 | ImGuiWindow* candidate_window = g.Windows[i]; |
| 7457 | if (candidate_window == potential_above) |
| 7458 | return true; |
| 7459 | if (candidate_window == potential_below) |
| 7460 | return false; |
| 7461 | } |
| 7462 | return false; |
| 7463 | } |
| 7464 | |
| 7465 | bool ImGui::IsWindowHovered(ImGuiHoveredFlags flags) |
| 7466 | { |
nothing calls this directly
no test coverage detected