Make UI7::IO::CurrentViewPort a Reference (finally)

This commit is contained in:
2026-03-18 21:33:35 +01:00
parent 3d8b57ead6
commit 0501a4f87c
6 changed files with 18 additions and 15 deletions

View File

@@ -239,9 +239,10 @@ PD_API void Menu::HandleTitlebarActions() {
// Keep Window In Viewport
// Maybe i need to add some operators to vec
pLayout->Pos.x = std::clamp<float>(pLayout->Pos.x, -pLayout->Size.x + 10,
pIO->CurrentViewPort.z - 10);
pLayout->Pos.y = std::clamp<float>(pLayout->Pos.y, pIO->CurrentViewPort.y,
pIO->CurrentViewPort.w - 10);
pIO->CurrentViewPort->pSize.z - 10);
pLayout->Pos.y =
std::clamp<float>(pLayout->Pos.y, pIO->CurrentViewPort->pSize.y,
pIO->CurrentViewPort->pSize.w - 10);
}
}
}