1
0
mirror of synced 2024-11-24 15:50:16 +01:00

impr: Force center modal views

This commit is contained in:
WerWolv 2023-12-04 22:32:25 +01:00
parent 08fd09064a
commit e8f0a3bd23

View File

@ -171,6 +171,7 @@ namespace hex {
if (this->getWindowOpenState())
ImGui::OpenPopup(View::toWindowName(this->getUnlocalizedName()).c_str());
ImGui::SetNextWindowPos(ImGui::GetMainViewport()->GetCenter(), ImGuiCond_Appearing, ImVec2(0.5F, 0.5F));
if (ImGui::BeginPopupModal(View::toWindowName(this->getUnlocalizedName()).c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_AlwaysAutoResize | this->getWindowFlags())) {
this->drawContent();