mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-22 15:23:01 +01:00
Keep options window centred after a resize (#22026)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
- Improved: [#21981] Rendering performance of the map window has been improved considerably.
|
||||
- Improved: [#21981] The map window now defaults to showing as much of the map as fits the screen.
|
||||
- Improved: [#21983] Taking a screenshot now shows a message again, closing when taking another.
|
||||
- Improved: [#22026] The options window now stays centred when window scaling is changed.
|
||||
- Change: [#7248] Small mini-maps are now centred in the map window.
|
||||
- Fix: [#13294] Map corners are cut off in some directions (original bug).
|
||||
- Fix: [#21974] No reason specified when attempting to place benches, lamps, or bins on path with no unconnected edges (original bug).
|
||||
|
||||
@@ -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