forked from rosebudai/OpenRCT2-Web
Keep options window centred after a resize (#22026)
This commit is contained in:
1 parent
59297f0038
commit
4ffe00aaba
2 files changed
+9
No files matched your search
@@ -1402,6 +1402,14 @@ void WindowResizeGui(int32_t width, int32_t height)
|
||||
optionsWind->windowPos.x = width - 80;
|
||||
}
|
||||
|
||||
// Keep options window centred after a resize
|
||||
WindowBase* optionsWindow = WindowFindByClass(WindowClass::Options);
|
||||
if (optionsWindow != nullptr)
|
||||
{
|
||||
optionsWindow->windowPos.x = (ContextGetWidth() - optionsWindow->width) / 2;
|
||||
optionsWindow->windowPos.y = (ContextGetHeight() - optionsWindow->height) / 2;
|
||||
}
|
||||
|
||||
GfxInvalidateScreen();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user