MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / GetPopupAllowedExtentRect

Method GetPopupAllowedExtentRect

KBotExt/imgui/imgui.cpp:10704–10712  ·  view source on GitHub ↗

Note that this is used for popups, which can overlap the non work-area of individual viewports.

Source from the content-addressed store, hash-verified

10702
10703// Note that this is used for popups, which can overlap the non work-area of individual viewports.
10704ImRect 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
10714ImVec2 ImGui::FindBestWindowPosForPopup(ImGuiWindow* window)
10715{

Callers

nothing calls this directly

Calls 2

ImVec2Function · 0.85
GetMainRectMethod · 0.80

Tested by

no test coverage detected