mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-20 22:33:02 +01:00
Fix #21207: Track List window gets positioned incorrectly
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
- Change: [#24069] [Plugin] Plugins are now available in the scenario editor and track designer.
|
- Change: [#24069] [Plugin] Plugins are now available in the scenario editor and track designer.
|
||||||
- Change: [#24135] Compress Emscripten js/wasm files.
|
- Change: [#24135] Compress Emscripten js/wasm files.
|
||||||
- Change: [#24235] Small changes to RCT1 theme.
|
- Change: [#24235] Small changes to RCT1 theme.
|
||||||
|
- Fix: [#21207] Track List window gets positioned incorrectly.
|
||||||
- Fix: [#21919] Non-recolourable cars still show colour picker.
|
- Fix: [#21919] Non-recolourable cars still show colour picker.
|
||||||
- Fix: [#22182] [Plugin] Crash when using map.getAllEntities("car").
|
- Fix: [#22182] [Plugin] Crash when using map.getAllEntities("car").
|
||||||
- Fix: [#22634] Asset packs with sound effect overrides are not loaded correctly at startup.
|
- Fix: [#22634] Asset packs with sound effect overrides are not loaded correctly at startup.
|
||||||
|
|||||||
@@ -756,19 +756,18 @@ namespace OpenRCT2::Ui::Windows
|
|||||||
auto* windowMgr = Ui::GetWindowManager();
|
auto* windowMgr = Ui::GetWindowManager();
|
||||||
windowMgr->CloseConstructionWindows();
|
windowMgr->CloseConstructionWindows();
|
||||||
|
|
||||||
|
WindowFlags flags = 0;
|
||||||
ScreenCoordsXY screenPos{};
|
ScreenCoordsXY screenPos{};
|
||||||
if (gLegacyScene == LegacyScene::trackDesignsManager)
|
if (gLegacyScene == LegacyScene::trackDesignsManager)
|
||||||
{
|
{
|
||||||
int32_t screenWidth = ContextGetWidth();
|
flags = WF_AUTO_POSITION | WF_CENTRE_SCREEN;
|
||||||
int32_t screenHeight = ContextGetHeight();
|
|
||||||
screenPos = { screenWidth / 2 - 300, std::max(kTopToolbarHeight + 1, screenHeight / 2 - 200) };
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screenPos = { 0, kTopToolbarHeight + 2 };
|
screenPos = { 0, kTopToolbarHeight + 2 };
|
||||||
}
|
}
|
||||||
|
|
||||||
return windowMgr->Create<TrackListWindow>(WindowClass::TrackDesignList, WW, WH, 0, item);
|
return windowMgr->Create<TrackListWindow>(WindowClass::TrackDesignList, screenPos, WW, WH, flags, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowTrackDesignListReloadTracks()
|
void WindowTrackDesignListReloadTracks()
|
||||||
|
|||||||
Reference in New Issue
Block a user