forked from rosebudai/OpenRCT2-Web
Keep progress bar window centred after resize (#22354)
This commit is contained in:
1 parent
2da5ed6517
commit
4cef38456a
3 files changed
+14
-5
No files matched your search
@@ -1427,6 +1427,14 @@ void WindowResizeGui(int32_t width, int32_t height)
|
||||
optionsWindow->windowPos.y = (ContextGetHeight() - optionsWindow->height) / 2;
|
||||
}
|
||||
|
||||
// Keep progress bar window centred after a resize
|
||||
WindowBase* ProgressWindow = WindowFindByClass(WindowClass::ProgressWindow);
|
||||
if (ProgressWindow != nullptr)
|
||||
{
|
||||
ProgressWindow->windowPos.x = (ContextGetWidth() - ProgressWindow->width) / 2;
|
||||
ProgressWindow->windowPos.y = (ContextGetHeight() - ProgressWindow->height) / 2;
|
||||
}
|
||||
|
||||
GfxInvalidateScreen();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user