Working on portrait mode

This commit is contained in:
Vladislav Khorev committed 2026-06-25 17:30:58 +03:00
1 parent 6b39cfca3b
commit 0b4df8ab2d
13 files changed
+1558 -28

No files matched your search

+5
View File
@@ -934,10 +934,15 @@ namespace ZL
if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_RESIZED) {
// Обновляем размеры и сбрасываем кеш текстов, т.к. меши хранятся в пикселях
const bool wasPortrait = Environment::width < Environment::height;
Environment::width = event.window.data1;
Environment::height = event.window.data2;
Environment::computeProjectionDimensions();
const bool isPortrait = Environment::width < Environment::height;
menuManager.uiManager.updateAllLayouts();
if (wasPortrait != isPortrait) {
menuManager.onOrientationChanged();
}
std::cout << "Window resized: " << Environment::width << "x" << Environment::height << std::endl;
//space.clearTextRendererCache();