diff --git a/distribution/changelog.txt b/distribution/changelog.txt index d1a6352b77..a511b4f821 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -4,6 +4,7 @@ - Feature: [#24702] [Plugin] Add bindings for missing cheats (forcedParkRating, ignoreRidePrice, makeAllDestructible). - Change: [#24730] Security guards now only walk slowly in crowded areas. - Fix: [#24598] Cannot load .park files that use official legacy footpaths by accident. +- Fix: [#24611] The confirmation prompt for track file deletion is not vertically aligned. - Fix: [#24711] The map smoothing function only partially works for custom height map image files. - Fix: [#24773] The new ride window debug authors does not show the correct authors for non legacy ride objects. - Fix: [#24775] The scenery and new ride windows do not filter by file name or identifier correctly for non legacy objects. diff --git a/src/openrct2-ui/windows/TrackDesignManage.cpp b/src/openrct2-ui/windows/TrackDesignManage.cpp index 317cc4248a..58da1e9daf 100644 --- a/src/openrct2-ui/windows/TrackDesignManage.cpp +++ b/src/openrct2-ui/windows/TrackDesignManage.cpp @@ -230,11 +230,17 @@ namespace OpenRCT2::Ui::Windows { DrawWidgets(rt); + const auto titleBarBottom = widgets[WIDX_TITLE].bottom; + const auto buttonTop = widgets[WIDX_PROMPT_DELETE].top; + const auto fontHeight = FontGetLineHeight(FontStyle::Medium); + + const auto maxMessageHeight = buttonTop - titleBarBottom; + const auto messageTop = titleBarBottom + (maxMessageHeight - fontHeight) / 2; + auto ft = Formatter(); ft.Add(_trackDesignFileReference->name.c_str()); DrawTextWrapped( - rt, windowPos + ScreenCoordsXY{ (kWindowSizeDeletePrompt.width / 2), ((kWindowSizeDeletePrompt.height / 2) - 9) }, - (kWindowSizeDeletePrompt.width - 4), STR_ARE_YOU_SURE_YOU_WANT_TO_PERMANENTLY_DELETE_TRACK, ft, - { TextAlignment::CENTRE }); + rt, windowPos + ScreenCoordsXY{ width / 2, messageTop }, (width - 4), + STR_ARE_YOU_SURE_YOU_WANT_TO_PERMANENTLY_DELETE_TRACK, ft, { TextAlignment::CENTRE }); } } // namespace OpenRCT2::Ui::Windows