1
0
mirror of synced 2024-12-01 02:37:18 +01:00

fix: Yet another popup centering issue

This commit is contained in:
WerWolv 2023-04-10 14:10:35 +02:00
parent 87d0aae608
commit 320629931c

View File

@ -547,8 +547,8 @@ namespace hex {
auto emptyWindowSize = ImGui::GetStyle().FramePadding * 4;
if (!sizeSet && popupSize.x > emptyWindowSize.x && popupSize.y > emptyWindowSize.y && popupSize.y < ImGui::GetMainViewport()->Size.y) {
ImGui::SetNextWindowSize(popupSize, ImGuiCond_FirstUseEver);
ImGui::SetNextWindowPos(ImGui::GetMainViewport()->GetCenter(), ImGuiCond_FirstUseEver, ImVec2(0.5F, 0.5F));
ImGui::SetNextWindowSize(popupSize, ImGuiCond_Always);
ImGui::SetNextWindowPos(ImGui::GetMainViewport()->GetCenter(), ImGuiCond_Always, ImVec2(0.5F, 0.5F));
sizeSet = true;
}