fix: Yet another popup centering issue
This commit is contained in:
parent
87d0aae608
commit
320629931c
@ -547,8 +547,8 @@ namespace hex {
|
|||||||
|
|
||||||
auto emptyWindowSize = ImGui::GetStyle().FramePadding * 4;
|
auto emptyWindowSize = ImGui::GetStyle().FramePadding * 4;
|
||||||
if (!sizeSet && popupSize.x > emptyWindowSize.x && popupSize.y > emptyWindowSize.y && popupSize.y < ImGui::GetMainViewport()->Size.y) {
|
if (!sizeSet && popupSize.x > emptyWindowSize.x && popupSize.y > emptyWindowSize.y && popupSize.y < ImGui::GetMainViewport()->Size.y) {
|
||||||
ImGui::SetNextWindowSize(popupSize, ImGuiCond_FirstUseEver);
|
ImGui::SetNextWindowSize(popupSize, ImGuiCond_Always);
|
||||||
ImGui::SetNextWindowPos(ImGui::GetMainViewport()->GetCenter(), ImGuiCond_FirstUseEver, ImVec2(0.5F, 0.5F));
|
ImGui::SetNextWindowPos(ImGui::GetMainViewport()->GetCenter(), ImGuiCond_Always, ImVec2(0.5F, 0.5F));
|
||||||
sizeSet = true;
|
sizeSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user