mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
Fix track deletion confirmation prompt not being aligned vertically (#24783)
Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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<const utf8*>(_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
|
||||
|
||||
Reference in New Issue
Block a user