Note that this is used for popups, which can overlap the non work-area of individual viewports.
| 10702 | |
| 10703 | // Note that this is used for popups, which can overlap the non work-area of individual viewports. |
| 10704 | ImRect ImGui::GetPopupAllowedExtentRect(ImGuiWindow* window) |
| 10705 | { |
| 10706 | ImGuiContext& g = *GImGui; |
| 10707 | IM_UNUSED(window); |
| 10708 | ImRect r_screen = ((ImGuiViewportP*)(void*)GetMainViewport())->GetMainRect(); |
| 10709 | ImVec2 padding = g.Style.DisplaySafeAreaPadding; |
| 10710 | r_screen.Expand(ImVec2((r_screen.GetWidth() > padding.x * 2) ? -padding.x : 0.0f, (r_screen.GetHeight() > padding.y * 2) ? -padding.y : 0.0f)); |
| 10711 | return r_screen; |
| 10712 | } |
| 10713 | |
| 10714 | ImVec2 ImGui::FindBestWindowPosForPopup(ImGuiWindow* window) |
| 10715 | { |
nothing calls this directly
no test coverage detected