fix: Popup positions when viewports are disabled
This commit is contained in:
parent
af18501726
commit
de4ea4081a
@ -741,7 +741,11 @@ namespace hex {
|
|||||||
const auto flags = currPopup->getFlags() | (!hasConstraints ? (ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoResize) : ImGuiWindowFlags_None);
|
const auto flags = currPopup->getFlags() | (!hasConstraints ? (ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoResize) : ImGuiWindowFlags_None);
|
||||||
|
|
||||||
if (!positionSet) {
|
if (!positionSet) {
|
||||||
ImGui::SetNextWindowPos(ImHexApi::System::getMainWindowPosition() + (ImHexApi::System::getMainWindowSize() / 2.0F), ImGuiCond_Always, ImVec2(0.5F, 0.5F));
|
if (ImGui::GetIO().ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
|
||||||
|
ImGui::SetNextWindowPos(ImHexApi::System::getMainWindowPosition() + (ImHexApi::System::getMainWindowSize() / 2.0F), ImGuiCond_Always, ImVec2(0.5F, 0.5F));
|
||||||
|
else
|
||||||
|
ImGui::SetNextWindowPos(ImHexApi::System::getMainWindowSize() / 2.0F, ImGuiCond_Always, ImVec2(0.5F, 0.5F));
|
||||||
|
|
||||||
if (sizeSet)
|
if (sizeSet)
|
||||||
positionSet = true;
|
positionSet = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user