diff --git a/src/openrct2-ui/interface/Graph.cpp b/src/openrct2-ui/interface/Graph.cpp index 4dbad6c4e0..29c1fc65a0 100644 --- a/src/openrct2-ui/interface/Graph.cpp +++ b/src/openrct2-ui/interface/Graph.cpp @@ -38,7 +38,7 @@ namespace OpenRCT2::Graph // Draw Y label text char buffer[64]{}; FormatStringToBuffer(buffer, sizeof(buffer), fmt, curLabel); - DrawTextBasic( + DrawText( rt, { internalBounds.GetLeft() - kYTickMarkPadding, curScreenPos }, buffer, { FontStyle::small, TextAlignment::right }); // Draw Y label tick mark @@ -69,7 +69,7 @@ namespace OpenRCT2::Graph // Draw month text auto ft = Formatter(); ft.Add(DateGameShortMonthNames[DateGetMonth((yearOver32 / 4) + MONTH_COUNT)]); - DrawTextBasic( + DrawText( rt, screenCoords - ScreenCoordsXY{ 0, 14 }, STR_GRAPH_LABEL, ft, { FontStyle::small, TextAlignment::centre }); // Draw month tick mark @@ -102,7 +102,7 @@ namespace OpenRCT2::Graph kDashLength, PaletteIndex::pi10); GfxDrawDashedLine(rt, { { bounds.GetLeft(), coords.y }, coords }, kDashLength, PaletteIndex::pi10); - DrawTextBasic(rt, coords - ScreenCoordsXY{ 0, 16 }, text, { textCol, TextAlignment::centre }); + DrawText(rt, coords - ScreenCoordsXY{ 0, 16 }, text, { textCol, TextAlignment::centre }); Rectangle::fill(rt, { { coords - ScreenCoordsXY{ 2, 2 } }, coords + ScreenCoordsXY{ 2, 2 } }, PaletteIndex::pi10); Rectangle::fill(rt, { { coords - ScreenCoordsXY{ 1, 1 } }, { coords + ScreenCoordsXY{ 1, 1 } } }, PaletteIndex::pi21); diff --git a/src/openrct2-ui/interface/InGameConsole.cpp b/src/openrct2-ui/interface/InGameConsole.cpp index 2be54719b6..e8e2e01ad9 100644 --- a/src/openrct2-ui/interface/InGameConsole.cpp +++ b/src/openrct2-ui/interface/InGameConsole.cpp @@ -343,22 +343,19 @@ void InGameConsole::Draw(RenderTarget& rt) const // as opposed to a desaturated grey if (textColour.colour == OpenRCT2::Drawing::Colour::black) { - DrawTextBasic(rt, screenCoords, "{BLACK}", { textColour, style }); - DrawTextBasic( - rt, screenCoords, _consoleLines[index].first, { kColourNull, style, { TextPaintFlag::noFormatting } }); + DrawText(rt, screenCoords, "{BLACK}", { textColour, style }); + DrawText(rt, screenCoords, _consoleLines[index].first, { kColourNull, style, { TextPaintFlag::noFormatting } }); } else { - DrawTextBasic( - rt, screenCoords, _consoleLines[index].first, { textColour, style, { TextPaintFlag::noFormatting } }); + DrawText(rt, screenCoords, _consoleLines[index].first, { textColour, style, { TextPaintFlag::noFormatting } }); } } else { std::string lineColour = FormatTokenToStringWithBraces(_consoleLines[index].second); - DrawTextBasic(rt, screenCoords, lineColour, { textColour, style }); - DrawTextBasic( - rt, screenCoords, _consoleLines[index].first, { kColourNull, style, { TextPaintFlag::noFormatting } }); + DrawText(rt, screenCoords, lineColour, { textColour, style }); + DrawText(rt, screenCoords, _consoleLines[index].first, { kColourNull, style, { TextPaintFlag::noFormatting } }); } screenCoords.y += lineHeight; @@ -369,12 +366,12 @@ void InGameConsole::Draw(RenderTarget& rt) const // Draw current line if (textColour.colour == OpenRCT2::Drawing::Colour::black) { - DrawTextBasic(rt, screenCoords, "{BLACK}", { textColour, style }); - DrawTextBasic(rt, screenCoords, _consoleCurrentLine, { kColourNull, style, { TextPaintFlag::noFormatting } }); + DrawText(rt, screenCoords, "{BLACK}", { textColour, style }); + DrawText(rt, screenCoords, _consoleCurrentLine, { kColourNull, style, { TextPaintFlag::noFormatting } }); } else { - DrawTextBasic(rt, screenCoords, _consoleCurrentLine, { textColour, style, { TextPaintFlag::noFormatting } }); + DrawText(rt, screenCoords, _consoleCurrentLine, { textColour, style, { TextPaintFlag::noFormatting } }); } // Draw caret diff --git a/src/openrct2-ui/interface/Widget.cpp b/src/openrct2-ui/interface/Widget.cpp index 1ca328b370..6b2370b6d7 100644 --- a/src/openrct2-ui/interface/Widget.cpp +++ b/src/openrct2-ui/interface/Widget.cpp @@ -511,7 +511,7 @@ namespace OpenRCT2::Ui auto ft = Formatter(); ft.Add(buffer); - DrawTextBasic(rt, { l, t }, STR_STRING, ft, { colour }); + DrawText(rt, { l, t }, STR_STRING, ft, { colour }); textRight = l + getStringWidth(buffer, FontStyle::medium) + 1; } @@ -648,7 +648,7 @@ namespace OpenRCT2::Ui if (widgetIsDisabled(w, widgetIndex)) colour.flags.set(ColourFlag::inset, true); - DrawTextBasic(rt, crossMidPoint, widget.string, { colour, TextAlignment::centre }); + DrawText(rt, crossMidPoint, widget.string, { colour, TextAlignment::centre }); } /** @@ -680,7 +680,7 @@ namespace OpenRCT2::Ui // fill it when checkbox is pressed if (widgetIsPressed(w, widgetIndex)) { - DrawTextBasic( + DrawText( rt, { midLeft - ScreenCoordsXY{ 0, 5 } }, kCheckMarkString, { colour.withFlag(ColourFlag::translucent, false) }); } @@ -805,7 +805,7 @@ namespace OpenRCT2::Ui : Rectangle::BorderStyle::outset; Rectangle::fillInset(rt, { { l, t }, { l + (kScrollBarWidth - 1), b } }, colour, borderStyle); - DrawTextBasic(rt, { l + 1, t }, kBlackLeftArrowString); + DrawText(rt, { l + 1, t }, kBlackLeftArrowString); } // Thumb @@ -824,7 +824,7 @@ namespace OpenRCT2::Ui : Rectangle::BorderStyle::outset; Rectangle::fillInset(rt, { { r - (kScrollBarWidth - 1), t }, { r, b } }, colour, borderStyle); - DrawTextBasic(rt, { r - 6, t }, kBlackRightArrowString); + DrawText(rt, { r - 6, t }, kBlackRightArrowString); } } @@ -850,7 +850,7 @@ namespace OpenRCT2::Ui Rectangle::fillInset( rt, { { l, t }, { r, t + (kScrollBarWidth - 1) } }, colour, ((scroll.flags & VSCROLLBAR_UP_PRESSED) ? Rectangle::BorderStyle::inset : Rectangle::BorderStyle::outset)); - DrawTextBasic(rt, { l + 1, t - 1 }, kBlackUpArrowString); + DrawText(rt, { l + 1, t - 1 }, kBlackUpArrowString); // Thumb Rectangle::fillInset( @@ -864,7 +864,7 @@ namespace OpenRCT2::Ui Rectangle::fillInset( rt, { { l, b - (kScrollBarWidth - 1) }, { r, b } }, colour, ((scroll.flags & VSCROLLBAR_DOWN_PRESSED) ? Rectangle::BorderStyle::inset : Rectangle::BorderStyle::outset)); - DrawTextBasic(rt, { l + 1, b - (kScrollBarWidth - 1) }, kBlackDownArrowString); + DrawText(rt, { l + 1, b - (kScrollBarWidth - 1) }, kBlackDownArrowString); } /** @@ -1196,8 +1196,7 @@ namespace OpenRCT2::Ui { u8string wrappedString; wrapString(widget.string, bottomRight.x - topLeft.x - 5, FontStyle::medium, &wrappedString, nullptr); - DrawTextBasic( - rt, { topLeft.x + 2, topLeft.y }, wrappedString, { w.colours[1], { TextPaintFlag::noFormatting } }); + DrawText(rt, { topLeft.x + 2, topLeft.y }, wrappedString, { w.colours[1], { TextPaintFlag::noFormatting } }); } return; } @@ -1207,7 +1206,7 @@ namespace OpenRCT2::Ui u8string wrappedString; wrapString(*textInput->Buffer, bottomRight.x - topLeft.x - 5 - 6, FontStyle::medium, &wrappedString, nullptr); - DrawTextBasic(rt, { topLeft.x + 2, topLeft.y }, wrappedString, { w.colours[1], { TextPaintFlag::noFormatting } }); + DrawText(rt, { topLeft.x + 2, topLeft.y }, wrappedString, { w.colours[1], { TextPaintFlag::noFormatting } }); // Make a trimmed view of the string for measuring the width. int32_t curX = topLeft.x diff --git a/src/openrct2-ui/scripting/CustomListView.cpp b/src/openrct2-ui/scripting/CustomListView.cpp index 936bc8d3a4..462e4ea73c 100644 --- a/src/openrct2-ui/scripting/CustomListView.cpp +++ b/src/openrct2-ui/scripting/CustomListView.cpp @@ -699,13 +699,13 @@ void CustomListView::PaintHeading( { auto ft = Formatter(); ft.Add(STR_UP); - DrawTextBasic(rt, pos + ScreenCoordsXY{ size.width - 1, 0 }, STR_BLACK_STRING, ft, { TextAlignment::right }); + DrawText(rt, pos + ScreenCoordsXY{ size.width - 1, 0 }, STR_BLACK_STRING, ft, { TextAlignment::right }); } else if (sortOrder == ColumnSortOrder::Descending) { auto ft = Formatter(); ft.Add(STR_DOWN); - DrawTextBasic(rt, pos + ScreenCoordsXY{ size.width - 1, 0 }, STR_BLACK_STRING, ft, { TextAlignment::right }); + DrawText(rt, pos + ScreenCoordsXY{ size.width - 1, 0 }, STR_BLACK_STRING, ft, { TextAlignment::right }); } } @@ -727,7 +727,7 @@ void CustomListView::PaintSeparator(RenderTarget& rt, const ScreenCoordsXY& pos, // Draw string Formatter ft; ft.Add(text); - DrawTextBasic(rt, { centreX, pos.y }, STR_STRING, ft, { baseColour, TextAlignment::centre }); + DrawText(rt, { centreX, pos.y }, STR_STRING, ft, { baseColour, TextAlignment::centre }); // Get string dimensions utf8 stringBuffer[512]{}; diff --git a/src/openrct2-ui/scripting/ScGraphicsContext.hpp b/src/openrct2-ui/scripting/ScGraphicsContext.hpp index 02e454884f..f3be06196a 100644 --- a/src/openrct2-ui/scripting/ScGraphicsContext.hpp +++ b/src/openrct2-ui/scripting/ScGraphicsContext.hpp @@ -240,7 +240,7 @@ namespace OpenRCT2::Scripting void text(const std::string& text, int32_t x, int32_t y) { - DrawTextBasic(_rt, { x, y }, text, { static_cast(_colour.value_or(0)) }); + DrawText(_rt, { x, y }, text, { static_cast(_colour.value_or(0)) }); } }; } // namespace OpenRCT2::Scripting diff --git a/src/openrct2-ui/windows/AssetPacks.cpp b/src/openrct2-ui/windows/AssetPacks.cpp index 9904da0199..8046695854 100644 --- a/src/openrct2-ui/windows/AssetPacks.cpp +++ b/src/openrct2-ui/windows/AssetPacks.cpp @@ -269,7 +269,7 @@ namespace OpenRCT2::Ui::Windows auto checkmark = Formatter(); checkmark.Add(STR_STRING); checkmark.Add(kCheckMarkString); - DrawTextBasic(rt, ScreenCoordsXY{ rect.GetLeft() + 1, rect.GetTop() }, STR_WINDOW_COLOUR_2_STRINGID, checkmark); + DrawText(rt, ScreenCoordsXY{ rect.GetLeft() + 1, rect.GetTop() }, STR_WINDOW_COLOUR_2_STRINGID, checkmark); } } diff --git a/src/openrct2-ui/windows/Changelog.cpp b/src/openrct2-ui/windows/Changelog.cpp index 4a93dac718..4b40ca9f4b 100644 --- a/src/openrct2-ui/windows/Changelog.cpp +++ b/src/openrct2-ui/windows/Changelog.cpp @@ -177,7 +177,7 @@ namespace OpenRCT2::Ui::Windows if (screenCoords.y + lineHeight < rt.y || screenCoords.y >= rt.y + rt.height) continue; - DrawTextBasic(rt, screenCoords, line, { colours[0] }); + DrawText(rt, screenCoords, line, { colours[0] }); } } diff --git a/src/openrct2-ui/windows/Cheats.cpp b/src/openrct2-ui/windows/Cheats.cpp index f06e6a218a..47fe1df0dc 100644 --- a/src/openrct2-ui/windows/Cheats.cpp +++ b/src/openrct2-ui/windows/Cheats.cpp @@ -624,36 +624,35 @@ static StringId window_cheats_page_titles[] = { } auto& widget = widgets[WIDX_MONEY_SPINNER]; - DrawTextBasic( - rt, windowPos + ScreenCoordsXY{ _xLcol, widget.top + 2 }, STR_BOTTOM_TOOLBAR_CASH, ft, { colour }); + DrawText(rt, windowPos + ScreenCoordsXY{ _xLcol, widget.top + 2 }, STR_BOTTOM_TOOLBAR_CASH, ft, { colour }); } else if (page == WINDOW_CHEATS_PAGE_DATE) { auto& yearBox = widgets[WIDX_YEAR_BOX]; - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ _xLcol, yearBox.top + 2 }, STR_YEAR); + DrawText(rt, windowPos + ScreenCoordsXY{ _xLcol, yearBox.top + 2 }, STR_YEAR); auto& monthBox = widgets[WIDX_MONTH_BOX]; - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ _xLcol, monthBox.top + 2 }, STR_MONTH); + DrawText(rt, windowPos + ScreenCoordsXY{ _xLcol, monthBox.top + 2 }, STR_MONTH); auto& dayBox = widgets[WIDX_DAY_BOX]; - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ _xLcol, dayBox.top + 2 }, STR_DAY); + DrawText(rt, windowPos + ScreenCoordsXY{ _xLcol, dayBox.top + 2 }, STR_DAY); auto ft = Formatter(); ft.Add(_yearSpinnerValue); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ _xRcol, yearBox.top + 2 }, STR_FORMAT_INTEGER, ft, { colours[1], TextAlignment::right }); ft = Formatter(); int32_t actual_month = _monthSpinnerValue - 1; ft.Add(actual_month); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ _xRcol, monthBox.top + 2 }, STR_FORMAT_MONTH, ft, { colours[1], TextAlignment::right }); ft = Formatter(); ft.Add(_daySpinnerValue); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ _xRcol, dayBox.top + 2 }, STR_FORMAT_INTEGER, ft, { colours[1], TextAlignment::right }); } @@ -663,55 +662,54 @@ static StringId window_cheats_page_titles[] = { ft.Add(_parkRatingSpinnerValue); auto& widget = widgets[WIDX_PARK_RATING_SPINNER]; - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ widget.left + 1, widget.top + 2 }, STR_FORMAT_INTEGER, ft, { colours[1] }); } else if (page == WINDOW_CHEATS_PAGE_STAFF) { auto& widget = widgets[WIDX_STAFF_SPEED]; - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 1 }, STR_CHEAT_STAFF_SPEED); + DrawText(rt, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 1 }, STR_CHEAT_STAFF_SPEED); } else if (page == WINDOW_CHEATS_PAGE_GUESTS) { { auto& widget = widgets[WIDX_GUEST_HAPPINESS_MIN]; - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 2 }, STR_CHEAT_GUEST_HAPPINESS); + DrawText(rt, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 2 }, STR_CHEAT_GUEST_HAPPINESS); } { auto& widget = widgets[WIDX_GUEST_ENERGY_MIN]; - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 2 }, STR_CHEAT_GUEST_ENERGY); + DrawText(rt, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 2 }, STR_CHEAT_GUEST_ENERGY); } { auto& widget = widgets[WIDX_GUEST_HUNGER_MIN]; - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 2 }, STR_CHEAT_GUEST_HUNGER); + DrawText(rt, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 2 }, STR_CHEAT_GUEST_HUNGER); } { auto& widget = widgets[WIDX_GUEST_THIRST_MIN]; - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 2 }, STR_CHEAT_GUEST_THIRST); + DrawText(rt, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 2 }, STR_CHEAT_GUEST_THIRST); } { auto& widget = widgets[WIDX_GUEST_NAUSEA_MIN]; - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 2 }, STR_CHEAT_GUEST_NAUSEA); + DrawText(rt, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 2 }, STR_CHEAT_GUEST_NAUSEA); } { auto& widget = widgets[WIDX_GUEST_NAUSEA_TOLERANCE_MIN]; - DrawTextBasic( - rt, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 2 }, STR_CHEAT_GUEST_NAUSEA_TOLERANCE); + DrawText(rt, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 2 }, STR_CHEAT_GUEST_NAUSEA_TOLERANCE); } { auto& widget = widgets[WIDX_GUEST_TOILET_MIN]; - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 2 }, STR_CHEAT_GUEST_TOILET); + DrawText(rt, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 2 }, STR_CHEAT_GUEST_TOILET); } { auto& widget = widgets[WIDX_GUEST_RIDE_INTENSITY_LESS_THAN_15]; - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top - 17 }, STR_CHEAT_GUEST_PREFERRED_INTENSITY); } } else if (page == WINDOW_CHEATS_PAGE_WEATHER) { auto& widget = widgets[WIDX_WEATHER]; - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 1 }, STR_CHANGE_WEATHER); + DrawText(rt, windowPos + ScreenCoordsXY{ _xLcol - 3, widget.top + 1 }, STR_CHANGE_WEATHER); } } diff --git a/src/openrct2-ui/windows/ClearScenery.cpp b/src/openrct2-ui/windows/ClearScenery.cpp index 2399df2b4c..01211e834a 100644 --- a/src/openrct2-ui/windows/ClearScenery.cpp +++ b/src/openrct2-ui/windows/ClearScenery.cpp @@ -184,8 +184,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(gLandToolSize); - DrawTextBasic( - rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::centre }); + DrawText(rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::centre }); } // Draw cost amount @@ -196,7 +195,7 @@ namespace OpenRCT2::Ui::Windows ft.Add(_clearSceneryCost); screenCoords.x = widgets[WIDX_PREVIEW].midX() + windowPos.x; screenCoords.y = widgets[WIDX_PREVIEW].bottom + windowPos.y + 5 + 27; - DrawTextBasic(rt, screenCoords, STR_COST_AMOUNT, ft, { TextAlignment::centre }); + DrawText(rt, screenCoords, STR_COST_AMOUNT, ft, { TextAlignment::centre }); } } diff --git a/src/openrct2-ui/windows/CustomCurrency.cpp b/src/openrct2-ui/windows/CustomCurrency.cpp index 278701b58b..9e47acb390 100644 --- a/src/openrct2-ui/windows/CustomCurrency.cpp +++ b/src/openrct2-ui/windows/CustomCurrency.cpp @@ -197,28 +197,27 @@ namespace OpenRCT2::Ui::Windows auto screenCoords = windowPos + ScreenCoordsXY{ 10, 18 + widgets[WIDX_TITLE].height() - 1 }; - DrawTextBasic(rt, screenCoords, STR_RATE, {}, { colours[1] }); + DrawText(rt, screenCoords, STR_RATE, {}, { colours[1] }); int32_t baseExchange = CurrencyDescriptors[EnumValue(CurrencyType::pounds)].rate; auto ft = Formatter(); ft.Add(baseExchange); - DrawTextBasic(rt, screenCoords + ScreenCoordsXY{ 200, 0 }, STR_CUSTOM_CURRENCY_EQUIVALENCY, ft, { colours[1] }); + DrawText(rt, screenCoords + ScreenCoordsXY{ 200, 0 }, STR_CUSTOM_CURRENCY_EQUIVALENCY, ft, { colours[1] }); screenCoords.y += 20; - DrawTextBasic(rt, screenCoords, STR_CURRENCY_SYMBOL_TEXT, {}, { colours[1] }); + DrawText(rt, screenCoords, STR_CURRENCY_SYMBOL_TEXT, {}, { colours[1] }); screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_SYMBOL_TEXT].left + 1, widgets[WIDX_SYMBOL_TEXT].top }; - DrawTextBasic( - rt, screenCoords, CurrencyDescriptors[EnumValue(CurrencyType::custom)].symbol_unicode, { colours[1] }); + DrawText(rt, screenCoords, CurrencyDescriptors[EnumValue(CurrencyType::custom)].symbol_unicode, { colours[1] }); auto drawPos = windowPos + ScreenCoordsXY{ widgets[WIDX_AFFIX_DROPDOWN].left + 1, widgets[WIDX_AFFIX_DROPDOWN].top }; StringId stringId = (CurrencyDescriptors[EnumValue(CurrencyType::custom)].affix_unicode == CurrencyAffix::prefix) ? STR_PREFIX : STR_SUFFIX; - DrawTextBasic(rt, drawPos, stringId, {}, { colours[1] }); + DrawText(rt, drawPos, stringId, {}, { colours[1] }); } }; diff --git a/src/openrct2-ui/windows/EditorBottomToolbar.cpp b/src/openrct2-ui/windows/EditorBottomToolbar.cpp index baf130dea5..2218f7eca9 100644 --- a/src/openrct2-ui/windows/EditorBottomToolbar.cpp +++ b/src/openrct2-ui/windows/EditorBottomToolbar.cpp @@ -371,8 +371,8 @@ namespace OpenRCT2::Ui::Windows if (gLegacyScene == LegacyScene::trackDesigner) stringId = STR_EDITOR_STEP_OBJECT_SELECTION; - DrawTextBasic(rt, { textX, textY }, STR_BACK_TO_PREVIOUS_STEP, {}, { textColour, TextAlignment::centre }); - DrawTextBasic(rt, { textX, textY + 10 }, stringId, {}, { textColour, TextAlignment::centre }); + DrawText(rt, { textX, textY }, STR_BACK_TO_PREVIOUS_STEP, {}, { textColour, TextAlignment::centre }); + DrawText(rt, { textX, textY + 10 }, stringId, {}, { textColour, TextAlignment::centre }); } void DrawRightButtonBack(RenderTarget& rt) @@ -412,8 +412,8 @@ namespace OpenRCT2::Ui::Windows if (gLegacyScene == LegacyScene::trackDesigner) stringId = STR_EDITOR_STEP_ROLLERCOASTER_DESIGNER; - DrawTextBasic(rt, { textX, textY }, STR_FORWARD_TO_NEXT_STEP, {}, { textColour, TextAlignment::centre }); - DrawTextBasic(rt, { textX, textY + 10 }, stringId, {}, { textColour, TextAlignment::centre }); + DrawText(rt, { textX, textY }, STR_FORWARD_TO_NEXT_STEP, {}, { textColour, TextAlignment::centre }); + DrawText(rt, { textX, textY + 10 }, stringId, {}, { textColour, TextAlignment::centre }); } void DrawStepText(RenderTarget& rt) @@ -421,7 +421,7 @@ namespace OpenRCT2::Ui::Windows int16_t stateX = (widgets[WIDX_PREVIOUS_IMAGE].right + widgets[WIDX_NEXT_IMAGE].left) / 2 + windowPos.x; int16_t stateY = height - 0x0C + windowPos.y; auto colour = colours[2].withFlag(ColourFlag::translucent, false).withFlag(ColourFlag::withOutline, true); - DrawTextBasic( + DrawText( rt, { stateX, stateY }, kEditorStepNames[EnumValue(getGameState().editorStep)], {}, { colour, TextAlignment::centre }); } diff --git a/src/openrct2-ui/windows/EditorInventionsList.cpp b/src/openrct2-ui/windows/EditorInventionsList.cpp index 0ea4114b22..c741bbbb1c 100644 --- a/src/openrct2-ui/windows/EditorInventionsList.cpp +++ b/src/openrct2-ui/windows/EditorInventionsList.cpp @@ -367,12 +367,12 @@ namespace OpenRCT2::Ui::Windows // Pre-researched items label screenPos = windowPos + ScreenCoordsXY{ widgets[WIDX_PRE_RESEARCHED_SCROLL].left, widgets[WIDX_PRE_RESEARCHED_SCROLL].top - 11 }; - DrawTextBasic(rt, screenPos - ScreenCoordsXY{ 0, 1 }, STR_INVENTION_PREINVENTED_ITEMS); + DrawText(rt, screenPos - ScreenCoordsXY{ 0, 1 }, STR_INVENTION_PREINVENTED_ITEMS); // Research order label screenPos = windowPos + ScreenCoordsXY{ widgets[WIDX_RESEARCH_ORDER_SCROLL].left, widgets[WIDX_RESEARCH_ORDER_SCROLL].top - 11 }; - DrawTextBasic(rt, screenPos - ScreenCoordsXY{ 0, 1 }, STR_INVENTION_TO_BE_INVENTED_ITEMS); + DrawText(rt, screenPos - ScreenCoordsXY{ 0, 1 }, STR_INVENTION_TO_BE_INVENTED_ITEMS); // Preview background auto& bkWidget = widgets[WIDX_PREVIEW]; @@ -441,7 +441,7 @@ namespace OpenRCT2::Ui::Windows screenPos.x = windowPos.x + widgets[WIDX_RESEARCH_ORDER_SCROLL].right + 4; ft = Formatter(); ft.Add(researchItem->GetCategoryInventionString()); - DrawTextBasic(rt, screenPos, STR_INVENTION_RESEARCH_GROUP, ft); + DrawText(rt, screenPos, STR_INVENTION_RESEARCH_GROUP, ft); } void onPrepareDraw() override diff --git a/src/openrct2-ui/windows/EditorObjectSelection.cpp b/src/openrct2-ui/windows/EditorObjectSelection.cpp index 2f23399979..7ef857a587 100644 --- a/src/openrct2-ui/windows/EditorObjectSelection.cpp +++ b/src/openrct2-ui/windows/EditorObjectSelection.cpp @@ -764,7 +764,7 @@ namespace OpenRCT2::Ui::Windows if (*listItem.flags & (ObjectSelectionFlags::InUse | ObjectSelectionFlags::AlwaysRequired)) colour2.flags.set(ColourFlag::inset, true); - DrawTextBasic(rt, screenCoords, kCheckMarkString, { colour2, FontStyle::medium, darkness }); + DrawText(rt, screenCoords, kCheckMarkString, { colour2, FontStyle::medium, darkness }); } screenCoords.x = gLegacyScene == LegacyScene::trackDesignsManager ? 0 : 15; @@ -1082,7 +1082,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(numSelected); ft.Add(totalSelectable); - DrawTextBasic(rt, screenPos, STR_OBJECT_SELECTION_SELECTION_SIZE, ft); + DrawText(rt, screenPos, STR_OBJECT_SELECTION_SELECTION_SIZE, ft); } // Draw sort button text @@ -1367,8 +1367,7 @@ namespace OpenRCT2::Ui::Windows // Draw fallback image warning if (_loadedObject && _loadedObject->UsesFallbackImages()) { - DrawTextBasic( - rt, screenPos, STR_OBJECT_USES_FALLBACK_IMAGES, {}, { Drawing::Colour::white, TextAlignment::right }); + DrawText(rt, screenPos, STR_OBJECT_USES_FALLBACK_IMAGES, {}, { Drawing::Colour::white, TextAlignment::right }); } screenPos.y += kListRowHeight; @@ -1376,7 +1375,7 @@ namespace OpenRCT2::Ui::Windows if (GetSelectedObjectType() == ObjectType::ride) { auto stringId = GetRideTypeStringId(listItem->repositoryItem); - DrawTextBasic(rt, screenPos, stringId, {}, { Drawing::Colour::white, TextAlignment::right }); + DrawText(rt, screenPos, stringId, {}, { Drawing::Colour::white, TextAlignment::right }); } // Draw peep animation object type @@ -1384,14 +1383,14 @@ namespace OpenRCT2::Ui::Windows { auto* animObj = reinterpret_cast(_loadedObject.get()); auto stringId = GetAnimationPeepTypeStringId(animObj->GetPeepType()); - DrawTextBasic(rt, screenPos, stringId, {}, { Drawing::Colour::white, TextAlignment::right }); + DrawText(rt, screenPos, stringId, {}, { Drawing::Colour::white, TextAlignment::right }); } screenPos.y += kListRowHeight; // Draw object source auto stringId = ObjectManagerGetSourceGameString(listItem->repositoryItem->GetFirstSourceGame()); - DrawTextBasic(rt, screenPos, stringId, {}, { Drawing::Colour::white, TextAlignment::right }); + DrawText(rt, screenPos, stringId, {}, { Drawing::Colour::white, TextAlignment::right }); screenPos.y += kListRowHeight; // Draw object filename @@ -1400,7 +1399,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(STR_STRING); ft.Add(path.c_str()); - DrawTextBasic( + DrawText( rt, { windowPos.x + this->width - 5, screenPos.y }, STR_WINDOW_COLOUR_2_STRINGID, ft, { Drawing::Colour::black, TextAlignment::right }); screenPos.y += kListRowHeight; diff --git a/src/openrct2-ui/windows/EditorScenarioOptions.cpp b/src/openrct2-ui/windows/EditorScenarioOptions.cpp index 13b22b3b25..3f11814b15 100644 --- a/src/openrct2-ui/windows/EditorScenarioOptions.cpp +++ b/src/openrct2-ui/windows/EditorScenarioOptions.cpp @@ -1155,7 +1155,7 @@ namespace OpenRCT2::Ui::Windows auto screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_OBJECTIVE].left + 1, widgets[WIDX_OBJECTIVE].top + 1 }; auto ft = Formatter(); ft.Add(ObjectiveDropdownOptionNames[EnumValue(scenarioOptions.objective.Type)]); - DrawTextBasic(rt, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); + DrawText(rt, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); if (widgets[WIDX_OBJECTIVE_ARG_1].type != WidgetType::empty) { @@ -1193,7 +1193,7 @@ namespace OpenRCT2::Ui::Windows ft.Add(scenarioOptions.objective.Currency); break; } - DrawTextBasic(rt, screenCoords, stringId, ft, wColour2); + DrawText(rt, screenCoords, stringId, ft, wColour2); } if (widgets[WIDX_OBJECTIVE_ARG_2].type != WidgetType::empty) @@ -1203,7 +1203,7 @@ namespace OpenRCT2::Ui::Windows + ScreenCoordsXY{ widgets[WIDX_OBJECTIVE_ARG_2].left + 1, widgets[WIDX_OBJECTIVE_ARG_2].top + 1 }; ft = Formatter(); ft.Add((scenarioOptions.objective.Year * MONTH_COUNT) - 1); - DrawTextBasic(rt, screenCoords, STR_WINDOW_OBJECTIVE_VALUE_DATE, ft); + DrawText(rt, screenCoords, STR_WINDOW_OBJECTIVE_VALUE_DATE, ft); } } @@ -1305,7 +1305,7 @@ namespace OpenRCT2::Ui::Windows // Scenario details label screenCoords = windowPos + ScreenCoordsXY{ 8, widgets[WIDX_DETAILS].top + 1 }; - DrawTextBasic(rt, screenCoords, STR_WINDOW_PARK_DETAILS); + DrawText(rt, screenCoords, STR_WINDOW_PARK_DETAILS); // Scenario details value screenCoords = windowPos + ScreenCoordsXY{ 16, widgets[WIDX_DETAILS].top + 10 }; @@ -1318,13 +1318,13 @@ namespace OpenRCT2::Ui::Windows // Scenario category label screenCoords = windowPos + ScreenCoordsXY{ 8, widgets[WIDX_CATEGORY].top + 1 }; - DrawTextBasic(rt, screenCoords, STR_WINDOW_SCENARIO_GROUP); + DrawText(rt, screenCoords, STR_WINDOW_SCENARIO_GROUP); // Scenario category value screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_CATEGORY].left + 1, widgets[WIDX_CATEGORY].top + 1 }; ft = Formatter(); ft.Add(Scenario::kScenarioCategoryStringIds[EnumValue(gameState.scenarioOptions.category)]); - DrawTextBasic(rt, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); + DrawText(rt, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); } /** @@ -1703,7 +1703,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(getGameState().scenarioOptions.initialCash); auto colour = !isWidgetDisabled(WIDX_INITIAL_CASH) ? wColour2 : wColour2.withFlag(ColourFlag::inset, true); - DrawTextBasic(rt, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft, colour); + DrawText(rt, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft, colour); } const auto& initialLoanWidget = widgets[WIDX_INITIAL_LOAN]; @@ -1713,7 +1713,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(gameState.park.bankLoan); auto colour = !isWidgetDisabled(WIDX_INITIAL_LOAN) ? wColour2 : wColour2.withFlag(ColourFlag::inset, true); - DrawTextBasic(rt, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft, colour); + DrawText(rt, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft, colour); } const auto& maximumLoanWidget = widgets[WIDX_MAXIMUM_LOAN]; @@ -1723,7 +1723,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(getGameState().park.maxBankLoan); auto colour = !isWidgetDisabled(WIDX_MAXIMUM_LOAN) ? wColour2 : wColour2.withFlag(ColourFlag::inset, true); - DrawTextBasic(rt, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft, colour); + DrawText(rt, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft, colour); } const auto& interestRateWidget = widgets[WIDX_INTEREST_RATE]; @@ -1735,7 +1735,7 @@ namespace OpenRCT2::Ui::Windows ft.Add( std::clamp(static_cast(gameState.park.bankLoanInterestRate), INT16_MIN, INT16_MAX)); auto colour = !isWidgetDisabled(WIDX_INTEREST_RATE) ? wColour2 : wColour2.withFlag(ColourFlag::inset, true); - DrawTextBasic(rt, screenCoords, STR_PERCENT_FORMAT_LABEL, ft, colour); + DrawText(rt, screenCoords, STR_PERCENT_FORMAT_LABEL, ft, colour); } const auto& payForParkOrRidesWidget = widgets[WIDX_PAY_FOR_PARK_OR_RIDES]; @@ -1755,7 +1755,7 @@ namespace OpenRCT2::Ui::Windows auto colour = !isWidgetDisabled(WIDX_PAY_FOR_PARK_OR_RIDES) ? wColour2 : wColour2.withFlag(ColourFlag::inset, true); - DrawTextBasic(rt, screenCoords, STR_STRINGID, ft, colour); + DrawText(rt, screenCoords, STR_STRINGID, ft, colour); } const auto& entryPriceWidget = widgets[WIDX_ENTRY_PRICE]; @@ -1766,7 +1766,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(gameState.park.entranceFee); auto colour = !isWidgetDisabled(WIDX_INITIAL_CASH) ? wColour2 : wColour2.withFlag(ColourFlag::inset, true); - DrawTextBasic(rt, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft, colour); + DrawText(rt, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft, colour); } } @@ -1990,7 +1990,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(gameState.scenarioOptions.guestInitialCash); auto colour = !isWidgetDisabled(WIDX_CASH_PER_GUEST) ? wColour2 : wColour2.withFlag(ColourFlag::inset, true); - DrawTextBasic(rt, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft, colour); + DrawText(rt, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft, colour); } auto colour = wColour2; @@ -2000,21 +2000,21 @@ namespace OpenRCT2::Ui::Windows screenCoords = windowPos + ScreenCoordsXY{ initialHappinessWidget.left + 1, initialHappinessWidget.top + 1 }; auto ft = Formatter(); ft.Add((gameState.scenarioOptions.guestInitialHappiness * 100) / 255); - DrawTextBasic(rt, screenCoords, STR_PERCENT_FORMAT_LABEL, ft, colour); + DrawText(rt, screenCoords, STR_PERCENT_FORMAT_LABEL, ft, colour); // Guest initial hunger value const auto& initialHungerWidget = widgets[WIDX_GUEST_INITIAL_HUNGER]; screenCoords = windowPos + ScreenCoordsXY{ initialHungerWidget.left + 1, initialHungerWidget.top + 1 }; ft = Formatter(); ft.Add(((255 - gameState.scenarioOptions.guestInitialHunger) * 100) / 255); - DrawTextBasic(rt, screenCoords, STR_PERCENT_FORMAT_LABEL, ft, colour); + DrawText(rt, screenCoords, STR_PERCENT_FORMAT_LABEL, ft, colour); // Guest initial thirst value const auto& initialThirstWidget = widgets[WIDX_GUEST_INITIAL_THIRST]; screenCoords = windowPos + ScreenCoordsXY{ initialThirstWidget.left + 1, initialThirstWidget.top + 1 }; ft = Formatter(); ft.Add(((255 - gameState.scenarioOptions.guestInitialThirst) * 100) / 255); - DrawTextBasic(rt, screenCoords, STR_PERCENT_FORMAT_LABEL, ft, colour); + DrawText(rt, screenCoords, STR_PERCENT_FORMAT_LABEL, ft, colour); // Guests' intensity value { @@ -2034,7 +2034,7 @@ namespace OpenRCT2::Ui::Windows ft = Formatter(); ft.Add(prefString); - DrawTextBasic(rt, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); + DrawText(rt, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); } } @@ -2193,7 +2193,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(gameState.scenarioOptions.landPrice); auto colour = !isWidgetDisabled(WIDX_LAND_COST) ? wColour2 : wColour2.withFlag(ColourFlag::inset, true); - DrawTextBasic(rt, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft, colour); + DrawText(rt, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft, colour); } const auto& constructionRightsCostWidget = widgets[WIDX_CONSTRUCTION_RIGHTS_COST]; @@ -2206,7 +2206,7 @@ namespace OpenRCT2::Ui::Windows ft.Add(gameState.scenarioOptions.constructionRightsPrice); auto colour = !isWidgetDisabled(WIDX_CONSTRUCTION_RIGHTS_COST) ? wColour2 : wColour2.withFlag(ColourFlag::inset, true); - DrawTextBasic(rt, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft, colour); + DrawText(rt, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft, colour); } } @@ -2371,7 +2371,7 @@ namespace OpenRCT2::Ui::Windows if (currentRide->flags.has(RideFlag::indestructible)) { auto darkness = stringId == STR_WINDOW_COLOUR_2_STRINGID ? TextDarkness::extraDark : TextDarkness::dark; - DrawTextBasic( + DrawText( rt, { 2, y }, kCheckMarkString, { colours[1].withFlag(ColourFlag::translucent, false), FontStyle::medium, darkness }); } @@ -2380,7 +2380,7 @@ namespace OpenRCT2::Ui::Windows Formatter ft; currentRide->formatNameTo(ft); - DrawTextBasic(rt, { 15, y }, stringId, ft); + DrawText(rt, { 15, y }, stringId, ft); } } } diff --git a/src/openrct2-ui/windows/Finances.cpp b/src/openrct2-ui/windows/Finances.cpp index 197d302973..83c6e76213 100644 --- a/src/openrct2-ui/windows/Finances.cpp +++ b/src/openrct2-ui/windows/Finances.cpp @@ -437,7 +437,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(STR_FINANCES_SUMMARY_MONTH_HEADING); ft.Add(monthyear); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ kExpenditureColumnWidth, 0 }, monthyear == currentMonthYear ? STR_WINDOW_COLOUR_2_STRINGID : STR_BLACK_STRING, ft, { { TextPaintFlag::underline }, TextAlignment::right }); @@ -455,7 +455,7 @@ namespace OpenRCT2::Ui::Windows : STR_FINANCES_SUMMARY_EXPENDITURE_VALUE; ft = Formatter(); ft.Add(expenditure); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ kExpenditureColumnWidth, 0 }, format, ft, { TextAlignment::right }); } @@ -467,8 +467,7 @@ namespace OpenRCT2::Ui::Windows const StringId format = profit >= 0 ? STR_FINANCES_SUMMARY_INCOME_VALUE : STR_FINANCES_SUMMARY_LOSS_VALUE; ft = Formatter(); ft.Add(profit); - DrawTextBasic( - rt, screenCoords + ScreenCoordsXY{ kExpenditureColumnWidth, 0 }, format, ft, { TextAlignment::right }); + DrawText(rt, screenCoords + ScreenCoordsXY{ kExpenditureColumnWidth, 0 }, format, ft, { TextAlignment::right }); Rectangle::fill( rt, @@ -596,7 +595,7 @@ namespace OpenRCT2::Ui::Windows auto& gameState = getGameState(); // Expenditure / Income heading - DrawTextBasic( + DrawText( rt, screenCoords, STR_FINANCES_SUMMARY_EXPENDITURE_INCOME, {}, { Drawing::Colour::black, { TextPaintFlag::underline }, TextAlignment::left }); screenCoords.y += 14; @@ -611,7 +610,7 @@ namespace OpenRCT2::Ui::Windows { screenCoords - ScreenCoordsXY{ 0, 1 }, screenCoords + ScreenCoordsXY{ 121, (kTableCellHeight - 2) } }, getColourMap(colours[1].colour).lighter, true); - DrawTextBasic(rt, screenCoords - ScreenCoordsXY{ 0, 1 }, _windowFinancesSummaryRowLabels[i]); + DrawText(rt, screenCoords - ScreenCoordsXY{ 0, 1 }, _windowFinancesSummaryRowLabels[i]); screenCoords.y += kTableCellHeight; } @@ -623,20 +622,19 @@ namespace OpenRCT2::Ui::Windows colours[1], Rectangle::BorderStyle::inset); // Loan and interest rate - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ 8, titleBarBottom + 265 }, STR_FINANCES_SUMMARY_LOAN); + DrawText(rt, windowPos + ScreenCoordsXY{ 8, titleBarBottom + 265 }, STR_FINANCES_SUMMARY_LOAN); if (!(gameState.park.flags & PARK_FLAGS_RCT1_INTEREST)) { auto ft = Formatter(); ft.Add(gameState.park.bankLoanInterestRate); - DrawTextBasic( - rt, windowPos + ScreenCoordsXY{ 167, titleBarBottom + 265 }, STR_FINANCES_SUMMARY_AT_X_PER_YEAR, ft); + DrawText(rt, windowPos + ScreenCoordsXY{ 167, titleBarBottom + 265 }, STR_FINANCES_SUMMARY_AT_X_PER_YEAR, ft); } // Current cash auto ft = Formatter(); ft.Add(gameState.park.cash); StringId stringId = gameState.park.cash >= 0 ? STR_CASH_LABEL : STR_CASH_NEGATIVE_LABEL; - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ 8, titleBarBottom + 280 }, stringId, ft); + DrawText(rt, windowPos + ScreenCoordsXY{ 8, titleBarBottom + 280 }, stringId, ft); // Objective related financial information if (gameState.scenarioOptions.objective.Type == Scenario::ObjectiveType::monthlyFoodIncome) @@ -644,7 +642,7 @@ namespace OpenRCT2::Ui::Windows auto lastMonthProfit = FinanceGetLastMonthShopProfit(); ft = Formatter(); ft.Add(lastMonthProfit); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 280, titleBarBottom + 265 }, STR_LAST_MONTH_PROFIT_FROM_FOOD_DRINK_MERCHANDISE_SALES_LABEL, ft); } @@ -653,10 +651,10 @@ namespace OpenRCT2::Ui::Windows // Park value and company value ft = Formatter(); ft.Add(gameState.park.value); - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ 280, titleBarBottom + 265 }, STR_PARK_VALUE_LABEL, ft); + DrawText(rt, windowPos + ScreenCoordsXY{ 280, titleBarBottom + 265 }, STR_PARK_VALUE_LABEL, ft); ft = Formatter(); ft.Add(gameState.park.companyValue); - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ 280, titleBarBottom + 280 }, STR_COMPANY_VALUE_LABEL, ft); + DrawText(rt, windowPos + ScreenCoordsXY{ 280, titleBarBottom + 280 }, STR_COMPANY_VALUE_LABEL, ft); } } @@ -754,7 +752,7 @@ namespace OpenRCT2::Ui::Windows uint16_t weeksRemaining = marketingCampaign->WeeksLeft; ft = Formatter(); ft.Add(weeksRemaining); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 304, 0 }, weeksRemaining == 1 ? STR_1_WEEK_REMAINING : STR_X_WEEKS_REMAINING, ft); @@ -763,7 +761,7 @@ namespace OpenRCT2::Ui::Windows if (noCampaignsActive) { - DrawTextBasic(rt, screenCoords + ScreenCoordsXY{ 4, 0 }, STR_MARKETING_CAMPAIGNS_NONE); + DrawText(rt, screenCoords + ScreenCoordsXY{ 4, 0 }, STR_MARKETING_CAMPAIGNS_NONE); } // Draw campaign button text @@ -774,10 +772,10 @@ namespace OpenRCT2::Ui::Windows { // Draw button text screenCoords = windowPos + ScreenCoordsXY{ campaignButton->left, campaignButton->textTop() }; - DrawTextBasic(rt, screenCoords + ScreenCoordsXY{ 4, 0 }, kMarketingCampaignNames[i][0]); + DrawText(rt, screenCoords + ScreenCoordsXY{ 4, 0 }, kMarketingCampaignNames[i][0]); auto ft = Formatter(); ft.Add(AdvertisingCampaignPricePerWeek[i]); - DrawTextBasic(rt, screenCoords + ScreenCoordsXY{ kCostPerWeekOffset, 0 }, STR_MARKETING_PER_WEEK, ft); + DrawText(rt, screenCoords + ScreenCoordsXY{ kCostPerWeekOffset, 0 }, STR_MARKETING_PER_WEEK, ft); } } } @@ -790,7 +788,7 @@ namespace OpenRCT2::Ui::Windows { Formatter ft; ft.Add(currentValue); - DrawTextBasic(rt, _graphBounds.Point1 - ScreenCoordsXY{ 0, 11 }, fmt, ft); + DrawText(rt, _graphBounds.Point1 - ScreenCoordsXY{ 0, 11 }, fmt, ft); // Graph Rectangle::fillInset( diff --git a/src/openrct2-ui/windows/Footpath.cpp b/src/openrct2-ui/windows/Footpath.cpp index 238e6331b7..1146fbd053 100644 --- a/src/openrct2-ui/windows/Footpath.cpp +++ b/src/openrct2-ui/windows/Footpath.cpp @@ -606,7 +606,7 @@ namespace OpenRCT2::Ui::Windows // Draw build this... label screenCoords = this->windowPos + ScreenCoordsXY{ widgets[WIDX_CONSTRUCT].midX(), widgets[WIDX_CONSTRUCT].bottom - 23 }; - DrawTextBasic(rt, screenCoords, STR_BUILD_THIS, {}, { TextAlignment::centre }); + DrawText(rt, screenCoords, STR_BUILD_THIS, {}, { TextAlignment::centre }); } // Draw cost @@ -618,7 +618,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(_windowFootpathCost); - DrawTextBasic(rt, screenCoords, STR_COST_LABEL, ft, { TextAlignment::centre }); + DrawText(rt, screenCoords, STR_COST_LABEL, ft, { TextAlignment::centre }); } } } diff --git a/src/openrct2-ui/windows/GameBottomToolbar.cpp b/src/openrct2-ui/windows/GameBottomToolbar.cpp index 85b0b3a667..2f1fe8556c 100644 --- a/src/openrct2-ui/windows/GameBottomToolbar.cpp +++ b/src/openrct2-ui/windows/GameBottomToolbar.cpp @@ -118,7 +118,7 @@ namespace OpenRCT2::Ui::Windows StringId stringId = gameState.park.cash < 0 ? STR_BOTTOM_TOOLBAR_CASH_NEGATIVE : STR_BOTTOM_TOOLBAR_CASH; auto ft = Formatter(); ft.Add(gameState.park.cash); - DrawTextBasic(rt, screenCoords, stringId, ft, { colour, TextAlignment::centre }); + DrawText(rt, screenCoords, stringId, ft, { colour, TextAlignment::centre }); } static constexpr StringId _guestCountFormats[] = { @@ -144,7 +144,7 @@ namespace OpenRCT2::Ui::Windows auto colour = GetHoverWidgetColour(WIDX_GUESTS); auto ft = Formatter(); ft.Add(gameState.park.numGuestsInPark); - DrawTextBasic(rt, screenCoords, stringId, ft, { colour, TextAlignment::centre }); + DrawText(rt, screenCoords, stringId, ft, { colour, TextAlignment::centre }); } // Draw park rating @@ -204,7 +204,7 @@ namespace OpenRCT2::Ui::Windows ft.Add(DateDayNames[day]); ft.Add(month); ft.Add(year); - DrawTextBasic(rt, screenCoords, stringId, ft, { colour, TextAlignment::centre }); + DrawText(rt, screenCoords, stringId, ft, { colour, TextAlignment::centre }); // Figure out how much line height we have to work with. uint32_t line_height = FontGetLineHeight(FontStyle::medium); @@ -221,7 +221,7 @@ namespace OpenRCT2::Ui::Windows } ft = Formatter(); ft.Add(temperature); - DrawTextBasic(rt, screenCoords + ScreenCoordsXY{ 0, 6 }, format, ft); + DrawText(rt, screenCoords + ScreenCoordsXY{ 0, 6 }, format, ft); screenCoords.x += 30; // Current weather diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 2c8bc4b11c..4188045ba7 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -858,7 +858,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); PeepThoughtSetFormatArgs(&peep->Thoughts[i], ft); - DrawTextBasic(rtMarquee, { screenPos.x, 0 }, STR_WINDOW_COLOUR_2_STRINGID, ft, { FontStyle::small }); + DrawText(rtMarquee, { screenPos.x, 0 }, STR_WINDOW_COLOUR_2_STRINGID, ft, { FontStyle::small }); } } @@ -1171,13 +1171,13 @@ namespace OpenRCT2::Ui::Windows int32_t timeInPark = (getGameState().currentTicks - guestEntryTime) >> 11; auto ft = Formatter(); ft.Add(timeInPark & 0xFFFF); - DrawTextBasic(rt, screenCoords, STR_GUEST_STAT_TIME_IN_PARK, ft); + DrawText(rt, screenCoords, STR_GUEST_STAT_TIME_IN_PARK, ft); } screenCoords.y += kListRowHeight + 9; // Preferred Ride - DrawTextBasic(rt, screenCoords, STR_GUEST_STAT_PREFERRED_RIDE); + DrawText(rt, screenCoords, STR_GUEST_STAT_PREFERRED_RIDE); screenCoords.y += kListRowHeight; // Intensity @@ -1198,7 +1198,7 @@ namespace OpenRCT2::Ui::Windows ft.Add(maxIntensity); } - DrawTextBasic(rt, screenCoords + ScreenCoordsXY{ 4, 0 }, string_id, ft); + DrawText(rt, screenCoords + ScreenCoordsXY{ 4, 0 }, string_id, ft); } // Nausea tolerance @@ -1213,7 +1213,7 @@ namespace OpenRCT2::Ui::Windows auto nausea_tolerance = EnumValue(peep->NauseaTolerance) & 0x3; auto ft = Formatter(); ft.Add(_nauseaTolerances[nausea_tolerance]); - DrawTextBasic(rt, screenCoords, STR_GUEST_STAT_NAUSEA_TOLERANCE, ft); + DrawText(rt, screenCoords, STR_GUEST_STAT_NAUSEA_TOLERANCE, ft); } } @@ -1386,7 +1386,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); r->formatNameTo(ft); - DrawTextBasic(rt, { 0, y - 1 }, stringId, ft); + DrawText(rt, { 0, y - 1 }, stringId, ft); } } } @@ -1444,7 +1444,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(peep->CashInPocket); - DrawTextBasic(rt, screenCoords, STR_GUEST_STAT_CASH_IN_POCKET, ft); + DrawText(rt, screenCoords, STR_GUEST_STAT_CASH_IN_POCKET, ft); screenCoords.y += kListRowHeight; } @@ -1452,7 +1452,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(peep->CashSpent); - DrawTextBasic(rt, screenCoords, STR_GUEST_STAT_CASH_SPENT, ft); + DrawText(rt, screenCoords, STR_GUEST_STAT_CASH_SPENT, ft); screenCoords.y += kListRowHeight * 2; } @@ -1464,7 +1464,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(peep->PaidToEnter); - DrawTextBasic(rt, screenCoords, STR_GUEST_EXPENSES_ENTRANCE_FEE, ft); + DrawText(rt, screenCoords, STR_GUEST_EXPENSES_ENTRANCE_FEE, ft); screenCoords.y += kListRowHeight; } // Paid on rides @@ -1474,11 +1474,11 @@ namespace OpenRCT2::Ui::Windows ft.Add(peep->GuestNumRides); if (peep->GuestNumRides != 1) { - DrawTextBasic(rt, screenCoords, STR_GUEST_EXPENSES_RIDE_PLURAL, ft); + DrawText(rt, screenCoords, STR_GUEST_EXPENSES_RIDE_PLURAL, ft); } else { - DrawTextBasic(rt, screenCoords, STR_GUEST_EXPENSES_RIDE, ft); + DrawText(rt, screenCoords, STR_GUEST_EXPENSES_RIDE, ft); } screenCoords.y += kListRowHeight; } @@ -1489,11 +1489,11 @@ namespace OpenRCT2::Ui::Windows ft.Add(peep->AmountOfFood); if (peep->AmountOfFood != 1) { - DrawTextBasic(rt, screenCoords, STR_GUEST_EXPENSES_FOOD_PLURAL, ft); + DrawText(rt, screenCoords, STR_GUEST_EXPENSES_FOOD_PLURAL, ft); } else { - DrawTextBasic(rt, screenCoords, STR_GUEST_EXPENSES_FOOD, ft); + DrawText(rt, screenCoords, STR_GUEST_EXPENSES_FOOD, ft); } screenCoords.y += kListRowHeight; } @@ -1505,11 +1505,11 @@ namespace OpenRCT2::Ui::Windows ft.Add(peep->AmountOfDrinks); if (peep->AmountOfDrinks != 1) { - DrawTextBasic(rt, screenCoords, STR_GUEST_EXPENSES_DRINK_PLURAL, ft); + DrawText(rt, screenCoords, STR_GUEST_EXPENSES_DRINK_PLURAL, ft); } else { - DrawTextBasic(rt, screenCoords, STR_GUEST_EXPENSES_DRINK, ft); + DrawText(rt, screenCoords, STR_GUEST_EXPENSES_DRINK, ft); } screenCoords.y += kListRowHeight; } @@ -1520,11 +1520,11 @@ namespace OpenRCT2::Ui::Windows ft.Add(peep->AmountOfSouvenirs); if (peep->AmountOfSouvenirs != 1) { - DrawTextBasic(rt, screenCoords, STR_GUEST_EXPENSES_SOUVENIR_PLURAL, ft); + DrawText(rt, screenCoords, STR_GUEST_EXPENSES_SOUVENIR_PLURAL, ft); } else { - DrawTextBasic(rt, screenCoords, STR_GUEST_EXPENSES_SOUVENIR, ft); + DrawText(rt, screenCoords, STR_GUEST_EXPENSES_SOUVENIR, ft); } } } @@ -1793,7 +1793,7 @@ namespace OpenRCT2::Ui::Windows if (numItems == 0) { - DrawTextBasic(rt, screenCoords, STR_NOTHING); + DrawText(rt, screenCoords, STR_NOTHING); } } #pragma endregion @@ -1846,7 +1846,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(peep->Id); - DrawTextBasic(rt, screenCoords, STR_PEEP_DEBUG_SPRITE_INDEX, ft); + DrawText(rt, screenCoords, STR_PEEP_DEBUG_SPRITE_INDEX, ft); } screenCoords.y += kListRowHeight; { @@ -1854,7 +1854,7 @@ namespace OpenRCT2::Ui::Windows ft.Add(peep->x); ft.Add(peep->y); ft.Add(peep->z); - DrawTextBasic(rt, screenCoords, STR_PEEP_DEBUG_POSITION, ft); + DrawText(rt, screenCoords, STR_PEEP_DEBUG_POSITION, ft); } screenCoords.y += kListRowHeight; { @@ -1875,7 +1875,7 @@ namespace OpenRCT2::Ui::Windows FormatStringLegacy(buffer2, sizeof(buffer2), STR_PEEP_DEBUG_NEXT_SLOPE, ft2.Data()); String::safeConcat(buffer, buffer2, sizeof(buffer)); } - DrawTextBasic(rt, screenCoords, buffer); + DrawText(rt, screenCoords, buffer); } screenCoords.y += kListRowHeight; { @@ -1883,7 +1883,7 @@ namespace OpenRCT2::Ui::Windows ft.Add(peep->DestinationX); ft.Add(peep->DestinationY); ft.Add(peep->DestinationTolerance); - DrawTextBasic(rt, screenCoords, STR_PEEP_DEBUG_DEST, ft); + DrawText(rt, screenCoords, STR_PEEP_DEBUG_DEST, ft); } screenCoords.y += kListRowHeight; { @@ -1892,10 +1892,10 @@ namespace OpenRCT2::Ui::Windows ft.Add(peep->PathfindGoal.y); ft.Add(peep->PathfindGoal.z); ft.Add(peep->PathfindGoal.direction); - DrawTextBasic(rt, screenCoords, STR_PEEP_DEBUG_PATHFIND_GOAL, ft); + DrawText(rt, screenCoords, STR_PEEP_DEBUG_PATHFIND_GOAL, ft); } screenCoords.y += kListRowHeight; - DrawTextBasic(rt, screenCoords, STR_PEEP_DEBUG_PATHFIND_HISTORY); + DrawText(rt, screenCoords, STR_PEEP_DEBUG_PATHFIND_HISTORY); screenCoords.y += kListRowHeight; screenCoords.x += 10; @@ -1906,7 +1906,7 @@ namespace OpenRCT2::Ui::Windows ft.Add(point.y); ft.Add(point.z); ft.Add(point.direction); - DrawTextBasic(rt, screenCoords, STR_PEEP_DEBUG_PATHFIND_HISTORY_ITEM, ft); + DrawText(rt, screenCoords, STR_PEEP_DEBUG_PATHFIND_HISTORY_ITEM, ft); screenCoords.y += kListRowHeight; } screenCoords.x -= 10; diff --git a/src/openrct2-ui/windows/GuestList.cpp b/src/openrct2-ui/windows/GuestList.cpp index 1a1573ccc4..e422a11f49 100644 --- a/src/openrct2-ui/windows/GuestList.cpp +++ b/src/openrct2-ui/windows/GuestList.cpp @@ -472,7 +472,7 @@ namespace OpenRCT2::Ui::Windows screenCoords = windowPos + ScreenCoordsXY{ 4, widgets[WIDX_GUEST_LIST].bottom + 2 }; auto ft = Formatter(); ft.Add(static_cast(_guestList.size())); - DrawTextBasic( + DrawText( rt, screenCoords, (_guestList.size() == 1 ? STR_FORMAT_NUM_GUESTS_SINGULAR : STR_FORMAT_NUM_GUESTS_PLURAL), ft); } @@ -759,7 +759,7 @@ namespace OpenRCT2::Ui::Windows ft = Formatter(); ft.Add(STR_GUESTS_COUNT_COMMA_SEP); ft.Add(group.NumGuests); - DrawTextBasic(rt, { 326, y }, format, ft, { TextAlignment::right }); + DrawText(rt, { 326, y }, format, ft, { TextAlignment::right }); } y += kSummarisedGuestsRowHeight; index++; diff --git a/src/openrct2-ui/windows/InstallTrack.cpp b/src/openrct2-ui/windows/InstallTrack.cpp index 11a8bd20d5..e71fad4309 100644 --- a/src/openrct2-ui/windows/InstallTrack.cpp +++ b/src/openrct2-ui/windows/InstallTrack.cpp @@ -193,7 +193,7 @@ namespace OpenRCT2::Ui::Windows auto trackName = _trackName.c_str(); auto ft = Formatter(); ft.Add(trackName); - DrawTextBasic(rt, screenPos - ScreenCoordsXY{ 1, 0 }, STR_TRACK_DESIGN_NAME, ft); + DrawText(rt, screenPos - ScreenCoordsXY{ 1, 0 }, STR_TRACK_DESIGN_NAME, ft); screenPos.y += kListRowHeight; } @@ -214,7 +214,7 @@ namespace OpenRCT2::Ui::Windows ft.Add(GetRideTypeDescriptor(td.trackAndVehicle.rtdIndex).Naming.Name); } - DrawTextBasic(rt, screenPos, STR_TRACK_DESIGN_TYPE, ft); + DrawText(rt, screenPos, STR_TRACK_DESIGN_TYPE, ft); screenPos.y += kListRowHeight + 4; } @@ -223,21 +223,21 @@ namespace OpenRCT2::Ui::Windows fixed32_2dp rating = td.statistics.ratings.excitement; auto ft = Formatter(); ft.Add(rating); - DrawTextBasic(rt, screenPos, STR_TRACK_LIST_EXCITEMENT_RATING, ft); + DrawText(rt, screenPos, STR_TRACK_LIST_EXCITEMENT_RATING, ft); screenPos.y += kListRowHeight; } { fixed32_2dp rating = td.statistics.ratings.intensity; auto ft = Formatter(); ft.Add(rating); - DrawTextBasic(rt, screenPos, STR_TRACK_LIST_INTENSITY_RATING, ft); + DrawText(rt, screenPos, STR_TRACK_LIST_INTENSITY_RATING, ft); screenPos.y += kListRowHeight; } { fixed32_2dp rating = td.statistics.ratings.nausea; auto ft = Formatter(); ft.Add(rating); - DrawTextBasic(rt, screenPos, STR_TRACK_LIST_NAUSEA_RATING, ft); + DrawText(rt, screenPos, STR_TRACK_LIST_NAUSEA_RATING, ft); screenPos.y += kListRowHeight + 4; } @@ -249,7 +249,7 @@ namespace OpenRCT2::Ui::Windows // Holes auto ft = Formatter(); ft.Add(td.statistics.holes); - DrawTextBasic(rt, screenPos, STR_HOLES, ft); + DrawText(rt, screenPos, STR_HOLES, ft); screenPos.y += kListRowHeight; } else @@ -259,7 +259,7 @@ namespace OpenRCT2::Ui::Windows uint16_t speed = ToHumanReadableSpeed(td.statistics.maxSpeed << 16); auto ft = Formatter(); ft.Add(speed); - DrawTextBasic(rt, screenPos, STR_MAX_SPEED, ft); + DrawText(rt, screenPos, STR_MAX_SPEED, ft); screenPos.y += kListRowHeight; } // Average speed @@ -267,7 +267,7 @@ namespace OpenRCT2::Ui::Windows uint16_t speed = ToHumanReadableSpeed(td.statistics.averageSpeed << 16); auto ft = Formatter(); ft.Add(speed); - DrawTextBasic(rt, screenPos, STR_AVERAGE_SPEED, ft); + DrawText(rt, screenPos, STR_AVERAGE_SPEED, ft); screenPos.y += kListRowHeight; } } @@ -287,7 +287,7 @@ namespace OpenRCT2::Ui::Windows int32_t gForces = td.statistics.maxPositiveVerticalG; auto ft = Formatter(); ft.Add(gForces); - DrawTextBasic(rt, screenPos, STR_MAX_POSITIVE_VERTICAL_G, ft); + DrawText(rt, screenPos, STR_MAX_POSITIVE_VERTICAL_G, ft); screenPos.y += kListRowHeight; } // Maximum negative vertical Gs @@ -295,7 +295,7 @@ namespace OpenRCT2::Ui::Windows int32_t gForces = td.statistics.maxNegativeVerticalG; auto ft = Formatter(); ft.Add(gForces); - DrawTextBasic(rt, screenPos, STR_MAX_NEGATIVE_VERTICAL_G, ft); + DrawText(rt, screenPos, STR_MAX_NEGATIVE_VERTICAL_G, ft); screenPos.y += kListRowHeight; } // Maximum lateral Gs @@ -303,7 +303,7 @@ namespace OpenRCT2::Ui::Windows int32_t gForces = td.statistics.maxLateralG; auto ft = Formatter(); ft.Add(gForces); - DrawTextBasic(rt, screenPos, STR_MAX_LATERAL_G, ft); + DrawText(rt, screenPos, STR_MAX_LATERAL_G, ft); screenPos.y += kListRowHeight; } if (td.statistics.totalAirTime != 0) @@ -311,7 +311,7 @@ namespace OpenRCT2::Ui::Windows int32_t airTime = ToHumanReadableAirTime(td.statistics.totalAirTime); auto ft = Formatter(); ft.Add(airTime); - DrawTextBasic(rt, screenPos, STR_TOTAL_AIR_TIME, ft); + DrawText(rt, screenPos, STR_TOTAL_AIR_TIME, ft); screenPos.y += kListRowHeight; } } @@ -320,11 +320,11 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(td.statistics.drops); - DrawTextBasic(rt, screenPos, STR_DROPS, ft); + DrawText(rt, screenPos, STR_DROPS, ft); screenPos.y += kListRowHeight; // Drop height is multiplied by 0.75 - DrawTextBasic(rt, screenPos, STR_HIGHEST_DROP_HEIGHT, ft); + DrawText(rt, screenPos, STR_HIGHEST_DROP_HEIGHT, ft); screenPos.y += kListRowHeight; } @@ -333,7 +333,7 @@ namespace OpenRCT2::Ui::Windows // Inversions auto ft = Formatter(); ft.Add(td.statistics.inversions); - DrawTextBasic(rt, screenPos, STR_INVERSIONS, ft); + DrawText(rt, screenPos, STR_INVERSIONS, ft); screenPos.y += kListRowHeight; } @@ -345,7 +345,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(td.statistics.spaceRequired.x); ft.Add(td.statistics.spaceRequired.y); - DrawTextBasic(rt, screenPos, STR_TRACK_LIST_SPACE_REQUIRED, ft); + DrawText(rt, screenPos, STR_TRACK_LIST_SPACE_REQUIRED, ft); screenPos.y += kListRowHeight; } @@ -353,7 +353,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(td.gameStateData.cost); - DrawTextBasic(rt, screenPos, STR_TRACK_LIST_COST_AROUND, ft); + DrawText(rt, screenPos, STR_TRACK_LIST_COST_AROUND, ft); } } diff --git a/src/openrct2-ui/windows/Land.cpp b/src/openrct2-ui/windows/Land.cpp index 8c22d54f3b..35623a4d53 100644 --- a/src/openrct2-ui/windows/Land.cpp +++ b/src/openrct2-ui/windows/Land.cpp @@ -276,8 +276,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(gLandToolSize); screenCoords = { windowPos.x + previewWidget->midX(), windowPos.y + previewWidget->midY() }; - DrawTextBasic( - rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::centre }); + DrawText(rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::centre }); } else if (_landToolMountainMode) { @@ -297,7 +296,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(_landToolRaiseCost); - DrawTextBasic(rt, screenCoords, STR_RAISE_COST_AMOUNT, ft, { TextAlignment::centre }); + DrawText(rt, screenCoords, STR_RAISE_COST_AMOUNT, ft, { TextAlignment::centre }); } screenCoords.y += 10; @@ -306,7 +305,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(_landToolLowerCost); - DrawTextBasic(rt, screenCoords, STR_LOWER_COST_AMOUNT, ft, { TextAlignment::centre }); + DrawText(rt, screenCoords, STR_LOWER_COST_AMOUNT, ft, { TextAlignment::centre }); } screenCoords.y += 50; @@ -330,7 +329,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(price); - DrawTextBasic(rt, screenCoords, STR_COST_AMOUNT, ft, { TextAlignment::centre }); + DrawText(rt, screenCoords, STR_COST_AMOUNT, ft, { TextAlignment::centre }); } } } diff --git a/src/openrct2-ui/windows/LandRights.cpp b/src/openrct2-ui/windows/LandRights.cpp index 609f29a7a6..f06b972077 100644 --- a/src/openrct2-ui/windows/LandRights.cpp +++ b/src/openrct2-ui/windows/LandRights.cpp @@ -404,8 +404,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(gLandToolSize); - DrawTextBasic( - rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::centre }); + DrawText(rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::centre }); } // Draw cost amount @@ -419,7 +418,7 @@ namespace OpenRCT2::Ui::Windows screenCoords = { widgets[WIDX_PREVIEW].midX() + windowPos.x, widgets[WIDX_PREVIEW].bottom + windowPos.y + offset }; - DrawTextBasic(rt, screenCoords, STR_COST_AMOUNT, ft, { TextAlignment::centre }); + DrawText(rt, screenCoords, STR_COST_AMOUNT, ft, { TextAlignment::centre }); } } diff --git a/src/openrct2-ui/windows/LoadSave.cpp b/src/openrct2-ui/windows/LoadSave.cpp index c20c5dd70a..129be09bd7 100644 --- a/src/openrct2-ui/windows/LoadSave.cpp +++ b/src/openrct2-ui/windows/LoadSave.cpp @@ -477,7 +477,7 @@ namespace OpenRCT2::Ui::Windows previewText = STR_LOADING_GENERIC; } - DrawTextBasic( + DrawText( rt, textPos, previewText, {}, { ColourWithFlags{ Drawing::Colour::white }.withFlag(ColourFlag::withOutline, true), TextAlignment::centre }); @@ -494,7 +494,7 @@ namespace OpenRCT2::Ui::Windows ft.Add(DateDayNames[_preview.day]); ft.Add(_preview.month); ft.Add(_preview.year + 1); - DrawTextBasic(rt, summaryCoords, STR_SUMMARY_DATE, ft); + DrawText(rt, summaryCoords, STR_SUMMARY_DATE, ft); summaryCoords.y += kListRowHeight; } @@ -502,7 +502,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(_preview.parkRating); - DrawTextBasic(rt, summaryCoords, STR_SUMMARY_PARK_RATING, ft); + DrawText(rt, summaryCoords, STR_SUMMARY_PARK_RATING, ft); summaryCoords.y += kListRowHeight; } @@ -511,7 +511,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(_preview.cash); - DrawTextBasic(rt, summaryCoords, STR_SUMMARY_CASH, ft); + DrawText(rt, summaryCoords, STR_SUMMARY_CASH, ft); summaryCoords.y += kListRowHeight; } @@ -519,7 +519,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(_preview.numRides); - DrawTextBasic(rt, summaryCoords, STR_SUMMARY_NUM_RIDES, ft); + DrawText(rt, summaryCoords, STR_SUMMARY_NUM_RIDES, ft); summaryCoords.y += kListRowHeight; } @@ -527,7 +527,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(_preview.numGuests); - DrawTextBasic(rt, summaryCoords, STR_SUMMARY_NUM_GUESTS, ft); + DrawText(rt, summaryCoords, STR_SUMMARY_NUM_GUESTS, ft); summaryCoords.y += kListRowHeight; } } @@ -796,7 +796,7 @@ namespace OpenRCT2::Ui::Windows if (action == LoadSaveAction::save) { auto& widget = widgets[WIDX_FILENAME_TEXTBOX]; - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 5, widget.top + 2 }, STR_FILENAME_LABEL, {}, { Drawing::Colour::grey }); } } @@ -1116,7 +1116,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(STR_RIGHTGUILLEMET); - DrawTextBasic(rt, { 0, y }, stringId, ft); + DrawText(rt, { 0, y }, stringId, ft); } // Folders get a folder icon diff --git a/src/openrct2-ui/windows/Map.cpp b/src/openrct2-ui/windows/Map.cpp index 65291eb71c..2ae107ff8a 100644 --- a/src/openrct2-ui/windows/Map.cpp +++ b/src/openrct2-ui/windows/Map.cpp @@ -692,7 +692,7 @@ namespace OpenRCT2::Ui::Windows Rectangle::fill( rt, { screenCoords + ScreenCoordsXY{ 0, 2 }, screenCoords + ScreenCoordsXY{ 6, 8 } }, kRideKeyColours[i].b); - DrawTextBasic(rt, screenCoords + ScreenCoordsXY{ kListRowHeight, 0 }, MapLabels[i]); + DrawText(rt, screenCoords + ScreenCoordsXY{ kListRowHeight, 0 }, MapLabels[i]); screenCoords.y += kListRowHeight; if (i == 3) { @@ -703,7 +703,7 @@ namespace OpenRCT2::Ui::Windows } else if (!isToolActive(*this, WIDX_SET_LAND_RIGHTS)) { - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 4, widgets[WIDX_MAP_SIZE_SPINNER_Y].top + 1 }, STR_MAP_SIZE, {}, { colours[1] }); } diff --git a/src/openrct2-ui/windows/MapGen.cpp b/src/openrct2-ui/windows/MapGen.cpp index 4bad69984a..74f849ca79 100644 --- a/src/openrct2-ui/windows/MapGen.cpp +++ b/src/openrct2-ui/windows/MapGen.cpp @@ -619,13 +619,13 @@ namespace OpenRCT2::Ui::Windows { auto textColour = isWidgetDisabled(WIDX_MAP_SIZE_Y) ? disabledColour : enabledColour; - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 10, widgets[WIDX_MAP_SIZE_Y].top + 1 }, STR_MAP_SIZE, {}, { textColour }); } { auto textColour = enabledColour; - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 10, widgets[WIDX_HEIGHTMAP_SOURCE].top + 1 }, STR_HEIGHTMAP_SOURCE, {}, { textColour }); } @@ -776,24 +776,24 @@ namespace OpenRCT2::Ui::Windows const auto textColour = _settings.trees ? enabledColour : disabledColour; // Tree to land ratio, label and value - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 10, widgets[WIDX_TREE_LAND_RATIO].top + 1 }, STR_MAPGEN_TREE_TO_LAND_RATIO, {}, { textColour }); auto ft = Formatter(); ft.Add(_settings.treeToLandRatio); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ widgets[WIDX_TREE_LAND_RATIO].left + 1, widgets[WIDX_TREE_LAND_RATIO].top + 1 }, STR_MAPGEN_TREE_TO_LAND_RATIO_PCT, ft, { textColour }); // Minimum tree altitude, label and value - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 10, widgets[WIDX_TREE_ALTITUDE_MIN].top + 1 }, STR_MAPGEN_TREE_MIN_ALTITUDE, {}, { textColour }); ft = Formatter(); ft.Add(BaseZToMetres(_settings.minTreeAltitude)); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ widgets[WIDX_TREE_ALTITUDE_MIN].left + 1, widgets[WIDX_TREE_ALTITUDE_MIN].top + 1 }, STR_RIDE_LENGTH_ENTRY, ft, { textColour }); @@ -802,13 +802,13 @@ namespace OpenRCT2::Ui::Windows const bool isFlatland = _settings.algorithm == MapGenerator::Algorithm::blank; const auto maxTreeTextColour = _settings.trees && !isFlatland ? enabledColour : disabledColour; - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 10, widgets[WIDX_TREE_ALTITUDE_MAX].top + 1 }, STR_MAPGEN_TREE_MAX_ALTITUDE, {}, { maxTreeTextColour }); ft = Formatter(); ft.Add(BaseZToMetres(_settings.maxTreeAltitude)); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ widgets[WIDX_TREE_ALTITUDE_MAX].left + 1, widgets[WIDX_TREE_ALTITUDE_MAX].top + 1 }, STR_RIDE_LENGTH_ENTRY, ft, { maxTreeTextColour }); @@ -876,23 +876,23 @@ namespace OpenRCT2::Ui::Windows const auto textColour = colours[1]; - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 10, widgets[WIDX_SIMPLEX_BASE_FREQ].top + 1 }, STR_MAPGEN_SIMPLEX_NOISE_BASE_FREQUENCY, {}, { textColour }); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 10, widgets[WIDX_SIMPLEX_OCTAVES].top + 1 }, STR_MAPGEN_SIMPLEX_NOISE_OCTAVES, {}, { textColour }); auto ft = Formatter(); ft.Add(_settings.simplex_base_freq); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ widgets[WIDX_SIMPLEX_BASE_FREQ].left + 1, widgets[WIDX_SIMPLEX_BASE_FREQ].top + 1 }, STR_WINDOW_COLOUR_2_COMMA2DP32, ft, { textColour }); ft = Formatter(); ft.Add(_settings.simplex_octaves); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ widgets[WIDX_SIMPLEX_OCTAVES].left + 1, widgets[WIDX_SIMPLEX_OCTAVES].top + 1 }, STR_COMMA16, ft, { textColour }); } @@ -989,7 +989,7 @@ namespace OpenRCT2::Ui::Windows const auto strengthColour = strengthDisabled ? disabledColour : enabledColour; // Smooth strength label - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 24, widgets[WIDX_HEIGHTMAP_STRENGTH].top + 1 }, STR_MAPGEN_SMOOTH_STRENGTH, {}, { strengthColour }); @@ -997,7 +997,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(_settings.smooth_strength); auto pos = ScreenCoordsXY{ widgets[WIDX_HEIGHTMAP_STRENGTH].left + 1, widgets[WIDX_HEIGHTMAP_STRENGTH].top + 1 }; - DrawTextBasic(rt, windowPos + pos, STR_COMMA16, ft, { strengthColour }); + DrawText(rt, windowPos + pos, STR_COMMA16, ft, { strengthColour }); // Current heightmap image filename ft = Formatter(); @@ -1239,31 +1239,31 @@ namespace OpenRCT2::Ui::Windows const auto disabledColour = enabledColour.withFlag(ColourFlag::inset, true); // Floor texture label - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 10, widgets[WIDX_FLOOR_TEXTURE].top + 1 }, STR_TERRAIN_LABEL, {}, { enabledColour }); // Minimum land height label and value - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 10, widgets[WIDX_HEIGHTMAP_LOW].top + 1 }, STR_MAPGEN_MIN_LAND_HEIGHT, {}, { enabledColour }); auto ft = Formatter(); ft.Add(BaseZToMetres(_settings.heightmapLow)); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ widgets[WIDX_HEIGHTMAP_LOW].left + 1, widgets[WIDX_HEIGHTMAP_LOW].top + 1 }, STR_RIDE_LENGTH_ENTRY, ft, { enabledColour }); const auto maxLandColour = isWidgetDisabled(WIDX_HEIGHTMAP_HIGH) ? disabledColour : enabledColour; // Maximum land height label and value - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 10, widgets[WIDX_HEIGHTMAP_HIGH].top + 1 }, STR_MAPGEN_MAX_LAND_HEIGHT, {}, { maxLandColour }); ft = Formatter(); ft.Add(BaseZToMetres(_settings.heightmapHigh)); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ widgets[WIDX_HEIGHTMAP_HIGH].left + 1, widgets[WIDX_HEIGHTMAP_HIGH].top + 1 }, STR_RIDE_LENGTH_ENTRY, ft, { maxLandColour }); } @@ -1347,13 +1347,13 @@ namespace OpenRCT2::Ui::Windows const auto textColour = colours[1]; - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 10, widgets[WIDX_WATER_LEVEL].top + 1 }, STR_WATER_LEVEL_LABEL, {}, { textColour }); auto ft = Formatter(); ft.Add(BaseZToMetres(_settings.waterLevel)); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ widgets[WIDX_WATER_LEVEL].left + 1, widgets[WIDX_WATER_LEVEL].top + 1 }, STR_RIDE_LENGTH_ENTRY, ft, { colours[1] }); } diff --git a/src/openrct2-ui/windows/Multiplayer.cpp b/src/openrct2-ui/windows/Multiplayer.cpp index edaf16da9b..99f4c218a3 100644 --- a/src/openrct2-ui/windows/Multiplayer.cpp +++ b/src/openrct2-ui/windows/Multiplayer.cpp @@ -216,7 +216,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(providerName.c_str()); - DrawTextBasic(clippedRT, screenCoords, STR_PROVIDER_NAME, ft); + DrawText(clippedRT, screenCoords, STR_PROVIDER_NAME, ft); screenCoords.y += kListRowHeight; } @@ -225,7 +225,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(providerEmail.c_str()); - DrawTextBasic(clippedRT, screenCoords, STR_PROVIDER_EMAIL, ft); + DrawText(clippedRT, screenCoords, STR_PROVIDER_EMAIL, ft); screenCoords.y += kListRowHeight; } @@ -234,7 +234,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(providerWebsite.c_str()); - DrawTextBasic(clippedRT, screenCoords, STR_PROVIDER_WEBSITE, ft); + DrawText(clippedRT, screenCoords, STR_PROVIDER_WEBSITE, ft); } } } @@ -246,7 +246,7 @@ namespace OpenRCT2::Ui::Windows auto screenCoords = windowPos + ScreenCoordsXY{ 4, widgets[WIDX_LIST].bottom + 2 }; auto ft = Formatter(); ft.Add(numListItems); - DrawTextBasic(rt, screenCoords, stringId, ft, { colours[2] }); + DrawText(rt, screenCoords, stringId, ft, { colours[2] }); } void playersScrollPaint(int32_t scrollIndex, RenderTarget& rt) const @@ -340,7 +340,7 @@ namespace OpenRCT2::Ui::Windows _buffer += pingBuffer; screenCoords.x = 356; - DrawTextBasic(rt, screenCoords, _buffer, { colour }); + DrawText(rt, screenCoords, _buffer, { colour }); } screenCoords.y += kScrollableRowHeight; listPosition++; @@ -368,7 +368,7 @@ namespace OpenRCT2::Ui::Windows auto screenPos = windowPos + ScreenCoordsXY{ widgets[WIDX_CONTENT_PANEL].left + 4, widgets[WIDX_CONTENT_PANEL].top + 4 }; - DrawTextBasic(rt, screenPos, STR_DEFAULT_GROUP, {}, { colours[2] }); + DrawText(rt, screenPos, STR_DEFAULT_GROUP, {}, { colours[2] }); screenPos.y += 20; @@ -420,14 +420,14 @@ namespace OpenRCT2::Ui::Windows if (Network::CanPerformAction(groupindex, static_cast(i))) { screenCoords.x = 0; - DrawTextBasic(rt, screenCoords, u8"{WINDOW_COLOUR_2}✓"); + DrawText(rt, screenCoords, u8"{WINDOW_COLOUR_2}✓"); } } // Draw action name auto ft = Formatter(); ft.Add(Network::GetActionNameStringID(i)); - DrawTextBasic(rt, { 10, screenCoords.y }, STR_WINDOW_COLOUR_2_STRINGID, ft); + DrawText(rt, { 10, screenCoords.y }, STR_WINDOW_COLOUR_2_STRINGID, ft); } screenCoords.y += kScrollableRowHeight; } diff --git a/src/openrct2-ui/windows/NetworkStatus.cpp b/src/openrct2-ui/windows/NetworkStatus.cpp index c6947c0944..c737337efc 100644 --- a/src/openrct2-ui/windows/NetworkStatus.cpp +++ b/src/openrct2-ui/windows/NetworkStatus.cpp @@ -98,7 +98,7 @@ namespace OpenRCT2::Ui::Windows ScreenCoordsXY screenCoords(windowPos.x + (width / 2), windowPos.y + (height / 2)); screenCoords.x -= Drawing::getStringWidth(_buffer, FontStyle::medium) / 2; - DrawTextBasic(rt, screenCoords, _buffer, { Drawing::Colour::black }); + DrawText(rt, screenCoords, _buffer, { Drawing::Colour::black }); } void setCloseCallBack(CloseCallback callback) diff --git a/src/openrct2-ui/windows/NewCampaign.cpp b/src/openrct2-ui/windows/NewCampaign.cpp index 03c2d631a2..5abf76bc3b 100644 --- a/src/openrct2-ui/windows/NewCampaign.cpp +++ b/src/openrct2-ui/windows/NewCampaign.cpp @@ -363,7 +363,7 @@ namespace OpenRCT2::Ui::Windows Widget* spinnerWidget = &widgets[WIDX_WEEKS_SPINNER]; auto ft = Formatter(); ft.Add(Campaign.no_weeks); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ spinnerWidget->left + 1, spinnerWidget->top }, Campaign.no_weeks == 1 ? STR_MARKETING_1_WEEK : STR_X_WEEKS, ft, { colours[0] }); @@ -372,13 +372,13 @@ namespace OpenRCT2::Ui::Windows // Price per week ft = Formatter(); ft.Add(AdvertisingCampaignPricePerWeek[Campaign.campaign_type]); - DrawTextBasic(rt, screenCoords, STR_MARKETING_COST_PER_WEEK, ft); + DrawText(rt, screenCoords, STR_MARKETING_COST_PER_WEEK, ft); screenCoords.y += 13; // Total price ft = Formatter(); ft.Add(AdvertisingCampaignPricePerWeek[Campaign.campaign_type] * Campaign.no_weeks); - DrawTextBasic(rt, screenCoords, STR_MARKETING_TOTAL_COST, ft); + DrawText(rt, screenCoords, STR_MARKETING_TOTAL_COST, ft); } int16_t getCampaignType() const diff --git a/src/openrct2-ui/windows/NewRide.cpp b/src/openrct2-ui/windows/NewRide.cpp index a88c3d63f7..baf3d220fb 100644 --- a/src/openrct2-ui/windows/NewRide.cpp +++ b/src/openrct2-ui/windows/NewRide.cpp @@ -984,7 +984,7 @@ namespace OpenRCT2::Ui::Windows auto designCountStringId = GetDesignsAvailableStringId(count); ft = Formatter(); ft.Add(count); - DrawTextBasic(rt, screenPos + ScreenCoordsXY{ 0, 51 }, designCountStringId, ft); + DrawText(rt, screenPos + ScreenCoordsXY{ 0, 51 }, designCountStringId, ft); } // Price @@ -1004,7 +1004,7 @@ namespace OpenRCT2::Ui::Windows ft = Formatter(); ft.Add(price); - DrawTextBasic(rt, screenPos + ScreenCoordsXY{ textWidth - 14, 51 }, stringId, ft, { TextAlignment::right }); + DrawText(rt, screenPos + ScreenCoordsXY{ textWidth - 14, 51 }, stringId, ft, { TextAlignment::right }); } // Draw object author(s) if debugging tools are active diff --git a/src/openrct2-ui/windows/News.cpp b/src/openrct2-ui/windows/News.cpp index 8be1eb37da..bd2bdbb49a 100644 --- a/src/openrct2-ui/windows/News.cpp +++ b/src/openrct2-ui/windows/News.cpp @@ -491,7 +491,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(DateDayNames[newsItem.day - 1]); ft.Add(DateGameMonthNames[DateGetMonth(newsItem.monthYear)]); - DrawTextBasic(rt, { 2, y }, STR_NEWS_DATE_FORMAT, ft, { Drawing::Colour::white, FontStyle::small }); + DrawText(rt, { 2, y }, STR_NEWS_DATE_FORMAT, ft, { Drawing::Colour::white, FontStyle::small }); } // Item text { diff --git a/src/openrct2-ui/windows/ObjectLoadError.cpp b/src/openrct2-ui/windows/ObjectLoadError.cpp index cf4c1ee135..044b8bad31 100644 --- a/src/openrct2-ui/windows/ObjectLoadError.cpp +++ b/src/openrct2-ui/windows/ObjectLoadError.cpp @@ -544,19 +544,18 @@ namespace OpenRCT2::Ui::Windows const auto& entry = _invalidEntries[i]; - DrawTextBasic(rt, screenCoords, entry.GetName(), { Colour::darkGreen }); + DrawText(rt, screenCoords, entry.GetName(), { Colour::darkGreen }); if (entry.Generation == ObjectGeneration::DAT) { // ... source game ... const auto sourceStringId = ObjectManagerGetSourceGameString(entry.Entry.GetSourceGame()); - DrawTextBasic( - rt, { kSourceColLeft - 3, screenCoords.y }, sourceStringId, {}, { Drawing::Colour::darkGreen }); + DrawText(rt, { kSourceColLeft - 3, screenCoords.y }, sourceStringId, {}, { Drawing::Colour::darkGreen }); } // ... and type const auto type = GetStringFromObjectType(entry.GetType()); - DrawTextBasic(rt, { kTypeColLeft - 3, screenCoords.y }, type, {}, { Drawing::Colour::darkGreen }); + DrawText(rt, { kTypeColLeft - 3, screenCoords.y }, type, {}, { Drawing::Colour::darkGreen }); } } diff --git a/src/openrct2-ui/windows/Options.cpp b/src/openrct2-ui/windows/Options.cpp index 0e4c0a7320..788f0c2a0f 100644 --- a/src/openrct2-ui/windows/Options.cpp +++ b/src/openrct2-ui/windows/Options.cpp @@ -1030,7 +1030,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(static_cast(Config::Get().general.windowScale * 100)); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ widgets[WIDX_SCALE].left + 1, widgets[WIDX_SCALE].top + 1 }, STR_WINDOW_COLOUR_2_COMMA2DP32, ft, { colours[1] }); } @@ -2221,7 +2221,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(Config::Get().general.autosaveAmount); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ widgets[WIDX_AUTOSAVE_AMOUNT].left + 1, widgets[WIDX_AUTOSAVE_AMOUNT].top + 1 }, STR_WINDOW_COLOUR_2_COMMA32, ft, { colours[1] }); diff --git a/src/openrct2-ui/windows/Park.cpp b/src/openrct2-ui/windows/Park.cpp index b371b7a2b1..d6063e3d1d 100644 --- a/src/openrct2-ui/windows/Park.cpp +++ b/src/openrct2-ui/windows/Park.cpp @@ -703,7 +703,7 @@ namespace OpenRCT2::Ui::Windows // Current value Formatter ft; ft.Add(getGameState().park.rating); - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ widget->left + 3, widget->top + 2 }, STR_PARK_RATING_LABEL, ft); + DrawText(rt, windowPos + ScreenCoordsXY{ widget->left + 3, widget->top + 2 }, STR_PARK_RATING_LABEL, ft); // Graph border Rectangle::fillInset( @@ -784,7 +784,7 @@ namespace OpenRCT2::Ui::Windows // Current value Formatter ft; ft.Add(getGameState().park.numGuestsInPark); - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ widget->left + 3, widget->top + 2 }, STR_GUESTS_IN_PARK_LABEL, ft); + DrawText(rt, windowPos + ScreenCoordsXY{ widget->left + 3, widget->top + 2 }, STR_GUESTS_IN_PARK_LABEL, ft); // Graph border Rectangle::fillInset( @@ -884,7 +884,7 @@ namespace OpenRCT2::Ui::Windows + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].left + 4, widgets[WIDX_PAGE_BACKGROUND].top + 30 }; auto ft = Formatter(); ft.Add(getGameState().park.totalIncomeFromAdmissions); - DrawTextBasic(rt, screenCoords, STR_INCOME_FROM_ADMISSIONS, ft); + DrawText(rt, screenCoords, STR_INCOME_FROM_ADMISSIONS, ft); money64 parkEntranceFee = Park::GetEntranceFee(); ft = Formatter(); @@ -895,7 +895,7 @@ namespace OpenRCT2::Ui::Windows stringId = STR_FREE; screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_PRICE].left + 1, widgets[WIDX_PRICE].top + 1 }; - DrawTextBasic(rt, screenCoords, stringId, ft, { colours[1] }); + DrawText(rt, screenCoords, stringId, ft, { colours[1] }); } #pragma endregion @@ -954,7 +954,7 @@ namespace OpenRCT2::Ui::Windows } auto ft = Formatter(); ft.Add(parkSize); - DrawTextBasic(rt, screenCoords, stringIndex, ft); + DrawText(rt, screenCoords, stringIndex, ft); screenCoords.y += kListRowHeight; // Draw number of rides / attractions @@ -962,7 +962,7 @@ namespace OpenRCT2::Ui::Windows { ft = Formatter(); ft.Add(_numberOfRides); - DrawTextBasic(rt, screenCoords, STR_NUMBER_OF_RIDES_LABEL, ft); + DrawText(rt, screenCoords, STR_NUMBER_OF_RIDES_LABEL, ft); } screenCoords.y += kListRowHeight; @@ -971,19 +971,19 @@ namespace OpenRCT2::Ui::Windows { ft = Formatter(); ft.Add(_numberOfStaff); - DrawTextBasic(rt, screenCoords, STR_STAFF_LABEL, ft); + DrawText(rt, screenCoords, STR_STAFF_LABEL, ft); } screenCoords.y += kListRowHeight; // Draw number of guests in park ft = Formatter(); ft.Add(gameState.park.numGuestsInPark); - DrawTextBasic(rt, screenCoords, STR_GUESTS_IN_PARK_LABEL, ft); + DrawText(rt, screenCoords, STR_GUESTS_IN_PARK_LABEL, ft); screenCoords.y += kListRowHeight; ft = Formatter(); ft.Add(gameState.park.totalAdmissions); - DrawTextBasic(rt, screenCoords, STR_TOTAL_ADMISSIONS, ft); + DrawText(rt, screenCoords, STR_TOTAL_ADMISSIONS, ft); } #pragma endregion @@ -1077,7 +1077,7 @@ namespace OpenRCT2::Ui::Windows screenCoords.y += 5; // Your objective: - DrawTextBasic(rt, screenCoords, STR_OBJECTIVE_LABEL); + DrawText(rt, screenCoords, STR_OBJECTIVE_LABEL); screenCoords.y += kListRowHeight; // Objective @@ -1146,7 +1146,7 @@ namespace OpenRCT2::Ui::Windows } if (currentAwards.empty()) - DrawTextBasic(rt, screenCoords + ScreenCoordsXY{ 6, 6 }, STR_NO_RECENT_AWARDS); + DrawText(rt, screenCoords + ScreenCoordsXY{ 6, 6 }, STR_NO_RECENT_AWARDS); } #pragma endregion diff --git a/src/openrct2-ui/windows/PatrolArea.cpp b/src/openrct2-ui/windows/PatrolArea.cpp index b45cd7e0f6..e0e7356979 100644 --- a/src/openrct2-ui/windows/PatrolArea.cpp +++ b/src/openrct2-ui/windows/PatrolArea.cpp @@ -148,8 +148,7 @@ namespace OpenRCT2::Ui::Windows windowPos.y + widgets[WIDX_PREVIEW].midY() }; auto ft = Formatter(); ft.Add(gLandToolSize); - DrawTextBasic( - rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::centre }); + DrawText(rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::centre }); } } diff --git a/src/openrct2-ui/windows/Player.cpp b/src/openrct2-ui/windows/Player.cpp index ec632f61a1..a26ecfa0de 100644 --- a/src/openrct2-ui/windows/Player.cpp +++ b/src/openrct2-ui/windows/Player.cpp @@ -448,10 +448,10 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(STR_PING); - DrawTextBasic(rt, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); + DrawText(rt, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); char ping[64]; snprintf(ping, 64, "%d ms", Network::GetPlayerPing(player)); - DrawTextBasic(rt, screenCoords + ScreenCoordsXY(30, 0), ping, { colours[2] }); + DrawText(rt, screenCoords + ScreenCoordsXY(30, 0), ping, { colours[2] }); // Draw last action screenCoords = windowPos + ScreenCoordsXY{ width / 2, height - 13 }; @@ -615,13 +615,13 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(Network::GetPlayerCommandsRan(player)); - DrawTextBasic(rt, screenCoords, STR_COMMANDS_RAN, ft); + DrawText(rt, screenCoords, STR_COMMANDS_RAN, ft); screenCoords.y += kListRowHeight; ft = Formatter(); ft.Add(Network::GetPlayerMoneySpent(player)); - DrawTextBasic(rt, screenCoords, STR_MONEY_SPENT, ft); + DrawText(rt, screenCoords, STR_MONEY_SPENT, ft); } #pragma endregion diff --git a/src/openrct2-ui/windows/Research.cpp b/src/openrct2-ui/windows/Research.cpp index 662309f55c..bf74d4b7bd 100644 --- a/src/openrct2-ui/windows/Research.cpp +++ b/src/openrct2-ui/windows/Research.cpp @@ -367,7 +367,7 @@ namespace OpenRCT2::Ui::Windows // Expected ft = Formatter(); ft.Add(STR_RESEARCH_STAGE_UNKNOWN); - DrawTextBasic(rt, screenCoords, STR_RESEARCH_EXPECTED_LABEL, ft); + DrawText(rt, screenCoords, STR_RESEARCH_EXPECTED_LABEL, ft); } else { @@ -426,7 +426,7 @@ namespace OpenRCT2::Ui::Windows { ft.Add(STR_RESEARCH_STAGE_UNKNOWN); } - DrawTextBasic(rt, screenCoords, STR_RESEARCH_EXPECTED_LABEL, ft); + DrawText(rt, screenCoords, STR_RESEARCH_EXPECTED_LABEL, ft); } // Last development @@ -584,8 +584,7 @@ namespace OpenRCT2::Ui::Windows int32_t currentResearchLevel = gameState.researchFundingLevel; auto ft = Formatter(); ft.Add(kResearchCosts[currentResearchLevel]); - DrawTextBasic( - rt, w->windowPos + ScreenCoordsXY{ 10, w->widgets[WIDX_TAB_1].top + 60 }, STR_RESEARCH_COST_PER_MONTH, ft); + DrawText(rt, w->windowPos + ScreenCoordsXY{ 10, w->widgets[WIDX_TAB_1].top + 60 }, STR_RESEARCH_COST_PER_MONTH, ft); } #pragma endregion diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index 292bd8ac80..2201d88c0a 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -2717,7 +2717,7 @@ namespace OpenRCT2::Ui::Windows } auto* widget = &widgets[WIDX_VIEW]; - DrawTextBasic( + DrawText( rt, { windowPos.x + (widget->left + widget->right - 11) / 2, windowPos.y + widget->textTop() }, STR_WINDOW_COLOUR_2_STRINGID, ft, { TextAlignment::centre }); @@ -2976,7 +2976,7 @@ namespace OpenRCT2::Ui::Windows // Capacity ft = Formatter(); ft.Add(rideEntry->capacity); - DrawTextBasic(rt, screenCoords, STR_CAPACITY, ft); + DrawText(rt, screenCoords, STR_CAPACITY, ft); // Excitement Factor if (rideEntry->excitement_multiplier != 0) @@ -2987,7 +2987,7 @@ namespace OpenRCT2::Ui::Windows ft.Add(abs(rideEntry->excitement_multiplier)); StringId stringId = rideEntry->excitement_multiplier > 0 ? STR_EXCITEMENT_FACTOR : STR_EXCITEMENT_FACTOR_NEGATIVE; - DrawTextBasic(rt, screenCoords, stringId, ft); + DrawText(rt, screenCoords, stringId, ft); } // Intensity Factor @@ -3002,7 +3002,7 @@ namespace OpenRCT2::Ui::Windows ft = Formatter(); ft.Add(abs(rideEntry->intensity_multiplier)); StringId stringId = rideEntry->intensity_multiplier > 0 ? STR_INTENSITY_FACTOR : STR_INTENSITY_FACTOR_NEGATIVE; - DrawTextBasic(rt, screenCoords, stringId, ft); + DrawText(rt, screenCoords, stringId, ft); if (lineHeight != 10) screenCoords.x -= 150; @@ -3016,7 +3016,7 @@ namespace OpenRCT2::Ui::Windows ft = Formatter(); ft.Add(abs(rideEntry->nausea_multiplier)); StringId stringId = rideEntry->nausea_multiplier > 0 ? STR_NAUSEA_FACTOR : STR_NAUSEA_FACTOR_NEGATIVE; - DrawTextBasic(rt, screenCoords, stringId, ft); + DrawText(rt, screenCoords, stringId, ft); } const auto minimumPreviewStart = screenCoords.y - windowPos.y + kListRowHeight + 5; @@ -3786,7 +3786,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(ride->numBlockBrakes + ride->numStations); auto underWidget = ride->mode == RideMode::poweredLaunchBlockSectioned ? WIDX_MODE_TWEAK : WIDX_MODE; - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 21, widgets[underWidget].bottom + 3 }, STR_BLOCK_SECTIONS, ft, { Drawing::Colour::black }); } @@ -4123,21 +4123,21 @@ namespace OpenRCT2::Ui::Windows // Inspection label widget = &widgets[WIDX_INSPECTION_INTERVAL]; screenCoords = windowPos + ScreenCoordsXY{ 4, widget->top + 1 }; - DrawTextBasic(rt, screenCoords, STR_INSPECTION); + DrawText(rt, screenCoords, STR_INSPECTION); // Reliability widget = &widgets[WIDX_RELIABILITY_BAR]; screenCoords = windowPos + ScreenCoordsXY{ 4, widget->top + 1 }; auto ft = Formatter(); ft.Add(reliability); - DrawTextBasic(rt, screenCoords, STR_RELIABILITY_LABEL_1757, ft); + DrawText(rt, screenCoords, STR_RELIABILITY_LABEL_1757, ft); // Down time widget = &widgets[WIDX_DOWN_TIME_BAR]; screenCoords = windowPos + ScreenCoordsXY{ 4, widget->top + 1 }; ft = Formatter(); ft.Add(downTime); - DrawTextBasic(rt, screenCoords, STR_DOWN_TIME_LABEL_1889, ft); + DrawText(rt, screenCoords, STR_DOWN_TIME_LABEL_1889, ft); screenCoords.y += 30; // Last inspection @@ -4151,7 +4151,7 @@ namespace OpenRCT2::Ui::Windows ft = Formatter(); ft.Add(ride->lastInspection); - DrawTextBasic(rt, screenCoords, stringId, ft); + DrawText(rt, screenCoords, stringId, ft); screenCoords.y += 15; // Last / current breakdown @@ -4161,7 +4161,7 @@ namespace OpenRCT2::Ui::Windows stringId = ride->flags.has(RideFlag::brokenDown) ? STR_CURRENT_BREAKDOWN : STR_LAST_BREAKDOWN; ft = Formatter(); ft.Add(RideBreakdownReasonNames[EnumValue(ride->breakdownReason)]); - DrawTextBasic(rt, screenCoords, stringId, ft); + DrawText(rt, screenCoords, stringId, ft); screenCoords.y += 15; // Mechanic status @@ -5453,7 +5453,7 @@ namespace OpenRCT2::Ui::Windows : STR_MUSIC_OBJECT_TRACK_LIST_ITEM_WITH_COMPOSER; // Draw the track - DrawTextBasic(rt, { 0, y }, stringId, ft, { FontStyle::small }); + DrawText(rt, { 0, y }, stringId, ft, { FontStyle::small }); y += kScrollableRowHeight; } } @@ -5784,7 +5784,7 @@ namespace OpenRCT2::Ui::Windows ft.Add(ratingName); StringId stringId = !RideHasRatings(*ride) ? STR_EXCITEMENT_RATING_NOT_YET_AVAILABLE : STR_EXCITEMENT_RATING; - DrawTextBasic(rt, screenCoords, stringId, ft); + DrawText(rt, screenCoords, stringId, ft); screenCoords.y += kListRowHeight; // Intensity @@ -5799,7 +5799,7 @@ namespace OpenRCT2::Ui::Windows else if (ride->ratings.intensity >= RideRating::make(10, 00)) stringId = STR_INTENSITY_RATING_RED; - DrawTextBasic(rt, screenCoords, stringId, ft); + DrawText(rt, screenCoords, stringId, ft); screenCoords.y += kListRowHeight; // Nausea @@ -5808,7 +5808,7 @@ namespace OpenRCT2::Ui::Windows ft.Add(ride->ratings.nausea); ft.Add(ratingName); stringId = !RideHasRatings(*ride) ? STR_NAUSEA_RATING_NOT_YET_AVAILABLE : STR_NAUSEA_RATING; - DrawTextBasic(rt, screenCoords, stringId, ft); + DrawText(rt, screenCoords, stringId, ft); screenCoords.y += 2 * kListRowHeight; // Horizontal rule @@ -5823,7 +5823,7 @@ namespace OpenRCT2::Ui::Windows // Holes ft = Formatter(); ft.Add(ride->numHoles); - DrawTextBasic(rt, screenCoords, STR_HOLES, ft); + DrawText(rt, screenCoords, STR_HOLES, ft); screenCoords.y += kListRowHeight; } else @@ -5831,13 +5831,13 @@ namespace OpenRCT2::Ui::Windows // Max speed ft = Formatter(); ft.Add(ToHumanReadableSpeed(ride->maxSpeed)); - DrawTextBasic(rt, screenCoords, STR_MAX_SPEED, ft); + DrawText(rt, screenCoords, STR_MAX_SPEED, ft); screenCoords.y += kListRowHeight; // Average speed ft = Formatter(); ft.Add(ToHumanReadableSpeed(ride->averageSpeed)); - DrawTextBasic(rt, screenCoords, STR_AVERAGE_SPEED, ft); + DrawText(rt, screenCoords, STR_AVERAGE_SPEED, ft); screenCoords.y += kListRowHeight; // Ride time @@ -5928,7 +5928,7 @@ namespace OpenRCT2::Ui::Windows ft = Formatter(); ft.Add(ride->maxPositiveVerticalG); - DrawTextBasic(rt, screenCoords, stringId, ft); + DrawText(rt, screenCoords, stringId, ft); screenCoords.y += kListRowHeight; // Max. negative vertical G's @@ -5937,20 +5937,20 @@ namespace OpenRCT2::Ui::Windows : STR_MAX_NEGATIVE_VERTICAL_G; ft = Formatter(); ft.Add(ride->maxNegativeVerticalG); - DrawTextBasic(rt, screenCoords, stringId, ft); + DrawText(rt, screenCoords, stringId, ft); screenCoords.y += kListRowHeight; // Max lateral G's stringId = ride->maxLateralG > kRideGForcesRedLateral ? STR_MAX_LATERAL_G_RED : STR_MAX_LATERAL_G; ft = Formatter(); ft.Add(ride->maxLateralG); - DrawTextBasic(rt, screenCoords, stringId, ft); + DrawText(rt, screenCoords, stringId, ft); screenCoords.y += kListRowHeight; // Total 'air' time ft = Formatter(); ft.Add(ToHumanReadableAirTime(ride->totalAirTime)); - DrawTextBasic(rt, screenCoords, STR_TOTAL_AIR_TIME, ft); + DrawText(rt, screenCoords, STR_TOTAL_AIR_TIME, ft); screenCoords.y += kListRowHeight; } @@ -5958,14 +5958,14 @@ namespace OpenRCT2::Ui::Windows { ft = Formatter(); ft.Add(ride->numDrops); - DrawTextBasic(rt, screenCoords, STR_DROPS, ft); + DrawText(rt, screenCoords, STR_DROPS, ft); screenCoords.y += kListRowHeight; // Highest drop height auto highestDropHeight = (ride->highestDropHeight * 3) / 4; ft = Formatter(); ft.Add(highestDropHeight); - DrawTextBasic(rt, screenCoords, STR_HIGHEST_DROP_HEIGHT, ft); + DrawText(rt, screenCoords, STR_HIGHEST_DROP_HEIGHT, ft); screenCoords.y += kListRowHeight; } @@ -5976,7 +5976,7 @@ namespace OpenRCT2::Ui::Windows { ft = Formatter(); ft.Add(ride->numInversions); - DrawTextBasic(rt, screenCoords, STR_INVERSIONS, ft); + DrawText(rt, screenCoords, STR_INVERSIONS, ft); screenCoords.y += kListRowHeight; } } @@ -5984,7 +5984,7 @@ namespace OpenRCT2::Ui::Windows } else { - DrawTextBasic(rt, screenCoords, STR_NO_TEST_RESULTS_YET); + DrawText(rt, screenCoords, STR_NO_TEST_RESULTS_YET); } } } @@ -6264,7 +6264,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(scaled_yUnit); - DrawTextBasic(rt, { scrolls[0].contentOffsetX + 1, y - 4 }, stringID, ft, { FontStyle::small }); + DrawText(rt, { scrolls[0].contentOffsetX + 1, y - 4 }, stringID, ft, { FontStyle::small }); } // Time marks @@ -6274,7 +6274,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(time); if (x + 80 >= rt.x) - DrawTextBasic(rt, { x + 2, 1 }, STR_RIDE_STATS_TIME, ft, { FontStyle::small }); + DrawText(rt, { x + 2, 1 }, STR_RIDE_STATS_TIME, ft, { FontStyle::small }); time += 5; } @@ -6788,7 +6788,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(profit); - DrawTextBasic(rt, screenCoords, stringId, ft); + DrawText(rt, screenCoords, stringId, ft); } screenCoords.y += 44; @@ -6812,7 +6812,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(profit); - DrawTextBasic(rt, screenCoords, stringId, ft); + DrawText(rt, screenCoords, stringId, ft); } screenCoords.y += 18; @@ -6822,7 +6822,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(ride->incomePerHour); - DrawTextBasic(rt, screenCoords, STR_INCOME_PER_HOUR, ft); + DrawText(rt, screenCoords, STR_INCOME_PER_HOUR, ft); screenCoords.y += kListRowHeight; } @@ -6831,7 +6831,7 @@ namespace OpenRCT2::Ui::Windows stringId = ride->upkeepCost == kMoney64Undefined ? STR_RUNNING_COST_UNKNOWN : STR_RUNNING_COST_PER_HOUR; auto ft = Formatter(); ft.Add(costPerHour); - DrawTextBasic(rt, screenCoords, stringId, ft); + DrawText(rt, screenCoords, stringId, ft); screenCoords.y += kListRowHeight; // Profit per hour @@ -6839,7 +6839,7 @@ namespace OpenRCT2::Ui::Windows { ft = Formatter(); ft.Add(ride->profit); - DrawTextBasic(rt, screenCoords, STR_PROFIT_PER_HOUR, ft); + DrawText(rt, screenCoords, STR_PROFIT_PER_HOUR, ft); screenCoords.y += kListRowHeight; } screenCoords.y += 5; @@ -6847,7 +6847,7 @@ namespace OpenRCT2::Ui::Windows // Total profit ft = Formatter(); ft.Add(ride->totalProfit); - DrawTextBasic(rt, screenCoords, STR_TOTAL_PROFIT, ft); + DrawText(rt, screenCoords, STR_TOTAL_PROFIT, ft); } #pragma endregion @@ -6968,14 +6968,14 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(ride->numRiders); - DrawTextBasic(rt, screenCoords, STR_CUSTOMERS_ON_RIDE, ft); + DrawText(rt, screenCoords, STR_CUSTOMERS_ON_RIDE, ft); screenCoords.y += kListRowHeight; } // Customers per hour auto ft = Formatter(); ft.Add(RideCustomersPerHour(*ride)); - DrawTextBasic(rt, screenCoords, STR_CUSTOMERS_PER_HOUR, ft); + DrawText(rt, screenCoords, STR_CUSTOMERS_PER_HOUR, ft); screenCoords.y += kListRowHeight; // Popularity @@ -6991,7 +6991,7 @@ namespace OpenRCT2::Ui::Windows } ft = Formatter(); ft.Add(popularity); - DrawTextBasic(rt, screenCoords, stringId, ft); + DrawText(rt, screenCoords, stringId, ft); screenCoords.y += kListRowHeight; // Satisfaction @@ -7007,7 +7007,7 @@ namespace OpenRCT2::Ui::Windows } ft = Formatter(); ft.Add(satisfaction); - DrawTextBasic(rt, screenCoords, stringId, ft); + DrawText(rt, screenCoords, stringId, ft); screenCoords.y += kListRowHeight; // Queue time @@ -7028,7 +7028,7 @@ namespace OpenRCT2::Ui::Windows ft = Formatter(); ft.Add(GetShopItemDescriptor(shopItem).Naming.Plural); ft.Add(ride->numPrimaryItemsSold); - DrawTextBasic(rt, screenCoords, STR_ITEMS_SOLD, ft); + DrawText(rt, screenCoords, STR_ITEMS_SOLD, ft); screenCoords.y += kListRowHeight; } @@ -7040,14 +7040,14 @@ namespace OpenRCT2::Ui::Windows ft = Formatter(); ft.Add(GetShopItemDescriptor(shopItem).Naming.Plural); ft.Add(ride->numSecondaryItemsSold); - DrawTextBasic(rt, screenCoords, STR_ITEMS_SOLD, ft); + DrawText(rt, screenCoords, STR_ITEMS_SOLD, ft); screenCoords.y += kListRowHeight; } // Total customers ft = Formatter(); ft.Add(ride->totalCustomers); - DrawTextBasic(rt, screenCoords, STR_TOTAL_CUSTOMERS, ft); + DrawText(rt, screenCoords, STR_TOTAL_CUSTOMERS, ft); screenCoords.y += kListRowHeight; // Guests favourite @@ -7056,7 +7056,7 @@ namespace OpenRCT2::Ui::Windows ft = Formatter(); ft.Add(ride->guestsFavourite); stringId = ride->guestsFavourite == 1 ? STR_FAVOURITE_RIDE_OF_GUEST : STR_FAVOURITE_RIDE_OF_GUESTS; - DrawTextBasic(rt, screenCoords, stringId, ft); + DrawText(rt, screenCoords, stringId, ft); screenCoords.y += kListRowHeight; } screenCoords.y += 2; @@ -7067,7 +7067,7 @@ namespace OpenRCT2::Ui::Windows stringId = age == 0 ? STR_BUILT_THIS_YEAR : age == 1 ? STR_BUILT_LAST_YEAR : STR_BUILT_YEARS_AGO; ft = Formatter(); ft.Add(age); - DrawTextBasic(rt, screenCoords, stringId, ft); + DrawText(rt, screenCoords, stringId, ft); } #pragma endregion diff --git a/src/openrct2-ui/windows/RideConstruction.cpp b/src/openrct2-ui/windows/RideConstruction.cpp index 3a25487972..a360e6011a 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -1721,14 +1721,14 @@ namespace OpenRCT2::Ui::Windows // Draw cost screenCoords = { windowPos.x + widget->midX(), windowPos.y + widget->bottom - 23 }; if (_rideConstructionState != RideConstructionState::Place) - DrawTextBasic(rt, screenCoords, STR_BUILD_THIS, {}, { TextAlignment::centre }); + DrawText(rt, screenCoords, STR_BUILD_THIS, {}, { TextAlignment::centre }); screenCoords.y += 11; if (_currentTrackPrice != kMoney64Undefined && !(getGameState().park.flags & PARK_FLAGS_NO_MONEY)) { auto ft = Formatter(); ft.Add(_currentTrackPrice); - DrawTextBasic(rt, screenCoords, STR_COST_LABEL, ft, { TextAlignment::centre }); + DrawText(rt, screenCoords, STR_COST_LABEL, ft, { TextAlignment::centre }); } } diff --git a/src/openrct2-ui/windows/RideList.cpp b/src/openrct2-ui/windows/RideList.cpp index 4ef243052f..8c8e522589 100644 --- a/src/openrct2-ui/windows/RideList.cpp +++ b/src/openrct2-ui/windows/RideList.cpp @@ -616,7 +616,7 @@ namespace OpenRCT2::Ui::Windows // Draw number of attractions on bottom auto ft = Formatter(); ft.Add(static_cast(CountVisibleItems())); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 4, widgets[WIDX_LIST].bottom + 2 }, ride_list_statusbar_count_strings[page], ft); } diff --git a/src/openrct2-ui/windows/ScenarioSelect.cpp b/src/openrct2-ui/windows/ScenarioSelect.cpp index 4d5d2dd16b..591f28ebc0 100644 --- a/src/openrct2-ui/windows/ScenarioSelect.cpp +++ b/src/openrct2-ui/windows/ScenarioSelect.cpp @@ -367,7 +367,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(shortPath.c_str()); - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ kTabWidth + 3, height - 3 - 11 }, STR_STRING, ft, { colours[1] }); + DrawText(rt, windowPos + ScreenCoordsXY{ kTabWidth + 3, height - 3 - 11 }, STR_STRING, ft, { colours[1] }); } // Scenario name @@ -385,7 +385,7 @@ namespace OpenRCT2::Ui::Windows { ft = Formatter(); ft.Add(STR_LOADING_GENERIC); - DrawTextBasic( + DrawText( rt, screenPos + ScreenCoordsXY{ previewPaneWidth / 2, 15 }, STR_BLACK_STRING, ft, { TextAlignment::centre }); return; @@ -606,7 +606,7 @@ namespace OpenRCT2::Ui::Windows auto darkness = isDisabled ? TextDarkness::dark : TextDarkness::regular; const auto scrollCentre = widgets[WIDX_SCENARIOLIST].width() / 2; - DrawTextBasic( + DrawText( rt, { scrollCentre, y + 1 }, format, ft, { colour, FontStyle::medium, TextAlignment::centre, darkness }); @@ -626,7 +626,7 @@ namespace OpenRCT2::Ui::Windows ft.Add(STR_COMPLETED_BY); ft.Add(STR_STRING); ft.Add(completedByName.c_str()); - DrawTextBasic( + DrawText( rt, { scrollCentre, y + scenarioTitleHeight + 1 }, format, ft, { FontStyle::small, TextAlignment::centre }); } @@ -647,7 +647,7 @@ namespace OpenRCT2::Ui::Windows // Draw string int32_t centreX = (left + right) / 2; - DrawTextBasic(rt, { centreX, y }, stringId, {}, { baseColour, TextAlignment::centre }); + DrawText(rt, { centreX, y }, stringId, {}, { baseColour, TextAlignment::centre }); // Get string dimensions utf8 buffer[512]; diff --git a/src/openrct2-ui/windows/Scenery.cpp b/src/openrct2-ui/windows/Scenery.cpp index 25b1200345..07fd44f294 100644 --- a/src/openrct2-ui/windows/Scenery.cpp +++ b/src/openrct2-ui/windows/Scenery.cpp @@ -909,7 +909,7 @@ namespace OpenRCT2::Ui::Windows ft.Add(price); // -14 - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ width - 0x1A, height - 13 }, STR_COST_LABEL, ft, { TextAlignment::right }); } diff --git a/src/openrct2-ui/windows/SceneryScatter.cpp b/src/openrct2-ui/windows/SceneryScatter.cpp index 99eaf8135a..7ac0da25a2 100644 --- a/src/openrct2-ui/windows/SceneryScatter.cpp +++ b/src/openrct2-ui/windows/SceneryScatter.cpp @@ -193,8 +193,7 @@ namespace OpenRCT2::Ui::Windows const auto screenCoords = ScreenCoordsXY{ windowPos.x + preview.midX(), windowPos.y + preview.midY() }; auto ft = Formatter(); ft.Add(gWindowSceneryScatterSize); - DrawTextBasic( - rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::centre }); + DrawText(rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::centre }); } } }; diff --git a/src/openrct2-ui/windows/ServerList.cpp b/src/openrct2-ui/windows/ServerList.cpp index 23e49153b4..2d85e36bb6 100644 --- a/src/openrct2-ui/windows/ServerList.cpp +++ b/src/openrct2-ui/windows/ServerList.cpp @@ -310,7 +310,7 @@ namespace OpenRCT2::Ui::Windows { drawWidgets(rt); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_PLAYER_NAME_INPUT].top }, STR_PLAYER_NAME, {}, { Drawing::Colour::white }); @@ -318,13 +318,13 @@ namespace OpenRCT2::Ui::Windows std::string version = Network::GetVersion(); auto ft = Formatter(); ft.Add(version.c_str()); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 324, widgets[WIDX_START_SERVER].top + 1 }, STR_NETWORK_VERSION, ft, { Drawing::Colour::white }); ft = Formatter(); ft.Add(_numPlayersOnline); - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ 8, height - 15 }, _statusText, ft, { Drawing::Colour::white }); + DrawText(rt, windowPos + ScreenCoordsXY{ 8, height - 15 }, _statusText, ft, { Drawing::Colour::white }); } void onScrollDraw(int32_t scrollIndex, RenderTarget& rt) override @@ -419,7 +419,7 @@ namespace OpenRCT2::Ui::Windows // Draw number of players screenCoords.x = right - numPlayersStringWidth; - DrawTextBasic(rt, screenCoords + ScreenCoordsXY{ 0, 3 }, players, { colours[1] }); + DrawText(rt, screenCoords + ScreenCoordsXY{ 0, 3 }, players, { colours[1] }); screenCoords.y += kItemHeight; } diff --git a/src/openrct2-ui/windows/ServerStart.cpp b/src/openrct2-ui/windows/ServerStart.cpp index ed7b6e8674..71e6143d90 100644 --- a/src/openrct2-ui/windows/ServerStart.cpp +++ b/src/openrct2-ui/windows/ServerStart.cpp @@ -236,18 +236,15 @@ namespace OpenRCT2::Ui::Windows void onDraw(Drawing::RenderTarget& rt) override { drawWidgets(rt); - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_PORT_INPUT].top }, STR_PORT, {}, { colours[1] }); - DrawTextBasic( - rt, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_NAME_INPUT].top }, STR_SERVER_NAME, {}, { colours[1] }); - DrawTextBasic( + DrawText(rt, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_PORT_INPUT].top }, STR_PORT, {}, { colours[1] }); + DrawText(rt, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_NAME_INPUT].top }, STR_SERVER_NAME, {}, { colours[1] }); + DrawText( rt, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_DESCRIPTION_INPUT].top }, STR_SERVER_DESCRIPTION, {}, { colours[1] }); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_GREETING_INPUT].top }, STR_SERVER_GREETING, {}, { colours[1] }); - DrawTextBasic( - rt, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_PASSWORD_INPUT].top }, STR_PASSWORD, {}, { colours[1] }); - DrawTextBasic( - rt, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_MAXPLAYERS].top }, STR_MAX_PLAYERS, {}, { colours[1] }); + DrawText(rt, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_PASSWORD_INPUT].top }, STR_PASSWORD, {}, { colours[1] }); + DrawText(rt, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_MAXPLAYERS].top }, STR_MAX_PLAYERS, {}, { colours[1] }); } private: diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index f04c66d6f5..eddf55bdea 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -941,13 +941,13 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(GetStaffWage(staff->AssignedStaffType)); - DrawTextBasic(rt, screenCoords, STR_STAFF_STAT_WAGES, ft); + DrawText(rt, screenCoords, STR_STAFF_STAT_WAGES, ft); screenCoords.y += kListRowHeight; } auto ft = Formatter(); ft.Add(staff->GetHireDate()); - DrawTextBasic(rt, screenCoords, STR_STAFF_STAT_EMPLOYED_FOR, ft); + DrawText(rt, screenCoords, STR_STAFF_STAT_EMPLOYED_FOR, ft); screenCoords.y += kListRowHeight; switch (staff->AssignedStaffType) @@ -955,37 +955,37 @@ namespace OpenRCT2::Ui::Windows case StaffType::handyman: ft = Formatter(); ft.Add(staff->StaffLawnsMown); - DrawTextBasic(rt, screenCoords, STR_STAFF_STAT_LAWNS_MOWN, ft); + DrawText(rt, screenCoords, STR_STAFF_STAT_LAWNS_MOWN, ft); screenCoords.y += kListRowHeight; ft = Formatter(); ft.Add(staff->StaffGardensWatered); - DrawTextBasic(rt, screenCoords, STR_STAFF_STAT_GARDENS_WATERED, ft); + DrawText(rt, screenCoords, STR_STAFF_STAT_GARDENS_WATERED, ft); screenCoords.y += kListRowHeight; ft = Formatter(); ft.Add(staff->StaffLitterSwept); - DrawTextBasic(rt, screenCoords, STR_STAFF_STAT_LITTER_SWEPT, ft); + DrawText(rt, screenCoords, STR_STAFF_STAT_LITTER_SWEPT, ft); screenCoords.y += kListRowHeight; ft = Formatter(); ft.Add(staff->StaffBinsEmptied); - DrawTextBasic(rt, screenCoords, STR_STAFF_STAT_BINS_EMPTIED, ft); + DrawText(rt, screenCoords, STR_STAFF_STAT_BINS_EMPTIED, ft); break; case StaffType::mechanic: ft = Formatter(); ft.Add(staff->StaffRidesInspected); - DrawTextBasic(rt, screenCoords, STR_STAFF_STAT_RIDES_INSPECTED, ft); + DrawText(rt, screenCoords, STR_STAFF_STAT_RIDES_INSPECTED, ft); screenCoords.y += kListRowHeight; ft = Formatter(); ft.Add(staff->StaffRidesFixed); - DrawTextBasic(rt, screenCoords, STR_STAFF_STAT_RIDES_FIXED, ft); + DrawText(rt, screenCoords, STR_STAFF_STAT_RIDES_FIXED, ft); break; case StaffType::security: ft = Formatter(); ft.Add(staff->StaffVandalsStopped); - DrawTextBasic(rt, screenCoords, STR_STAFF_STAT_VANDALS_STOPPED, ft); + DrawText(rt, screenCoords, STR_STAFF_STAT_VANDALS_STOPPED, ft); break; case StaffType::entertainer: case StaffType::count: diff --git a/src/openrct2-ui/windows/StaffList.cpp b/src/openrct2-ui/windows/StaffList.cpp index 5222e8d99f..25d8c917a9 100644 --- a/src/openrct2-ui/windows/StaffList.cpp +++ b/src/openrct2-ui/windows/StaffList.cpp @@ -285,12 +285,12 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(GetStaffWage(GetSelectedStaffType())); auto y = widgets[WIDX_STAFF_LIST_TITLE].bottom + 17; - DrawTextBasic(rt, windowPos + ScreenCoordsXY{ width - 155, y }, STR_COST_PER_MONTH, ft); + DrawText(rt, windowPos + ScreenCoordsXY{ width - 155, y }, STR_COST_PER_MONTH, ft); } if (GetSelectedStaffType() != StaffType::entertainer) { - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 6, widgets[WIDX_STAFF_LIST_UNIFORM_COLOUR_PICKER].top + 1 }, STR_UNIFORM_COLOUR); } @@ -302,8 +302,7 @@ namespace OpenRCT2::Ui::Windows ft.Add(_staffList.size()); ft.Add(staffTypeStringId); - DrawTextBasic( - rt, windowPos + ScreenCoordsXY{ 4, widgets[WIDX_STAFF_LIST_LIST].bottom + 2 }, STR_STAFF_LIST_COUNTER, ft); + DrawText(rt, windowPos + ScreenCoordsXY{ 4, widgets[WIDX_STAFF_LIST_LIST].bottom + 2 }, STR_STAFF_LIST_COUNTER, ft); } ScreenSize onScrollGetSize(int32_t scrollIndex) override diff --git a/src/openrct2-ui/windows/TextInput.cpp b/src/openrct2-ui/windows/TextInput.cpp index f1fa42f835..7f9eb9769d 100644 --- a/src/openrct2-ui/windows/TextInput.cpp +++ b/src/openrct2-ui/windows/TextInput.cpp @@ -245,7 +245,7 @@ namespace OpenRCT2::Ui::Windows for (int32_t line = 0; line <= no_lines; line++) { screenCoords.x = windowPos.x + 12; - DrawTextBasic( + DrawText( rt, screenCoords, wrapPointer, { colours[1], FontStyle::medium, { TextPaintFlag::noFormatting }, TextAlignment::left }); diff --git a/src/openrct2-ui/windows/Themes.cpp b/src/openrct2-ui/windows/Themes.cpp index 3cd1eaeedb..231c9f6a63 100644 --- a/src/openrct2-ui/windows/Themes.cpp +++ b/src/openrct2-ui/windows/Themes.cpp @@ -398,7 +398,7 @@ namespace OpenRCT2::Ui::Windows if (_selectedTab == WINDOW_THEMES_TAB_SETTINGS) { - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 10, widgets[WIDX_THEMES_PRESETS].top + 1 }, STR_THEMES_LABEL_CURRENT_THEME, {}, { colours[1] }); @@ -803,7 +803,7 @@ namespace OpenRCT2::Ui::Windows Rectangle::FillBrightness::dark, Rectangle::FillMode::dontLightenWhenInset); if (colour.flags.has(ColourFlag::translucent)) { - DrawTextBasic( + DrawText( rt, topLeft, kCheckMarkString, { colours[1].colour, FontStyle::medium, TextDarkness::dark }); } } diff --git a/src/openrct2-ui/windows/TileInspector.cpp b/src/openrct2-ui/windows/TileInspector.cpp index b51ad10eaa..930949443a 100644 --- a/src/openrct2-ui/windows/TileInspector.cpp +++ b/src/openrct2-ui/windows/TileInspector.cpp @@ -1059,19 +1059,19 @@ static uint64_t PageDisabledWidgets[] = { auto tileCoords = TileCoordsXY{ _toolMap }; auto ft = Formatter(); ft.Add(tileCoords.x); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 43, yOffset }, STR_FORMAT_INTEGER, ft, { colours[1], TextAlignment::right }); ft = Formatter(); ft.Add(tileCoords.y); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 113, yOffset }, STR_FORMAT_INTEGER, ft, { colours[1], TextAlignment::right }); } else { - DrawTextBasic(rt, screenCoords + ScreenCoordsXY(43 - 7, yOffset), "-", { colours[1] }); - DrawTextBasic(rt, screenCoords + ScreenCoordsXY(113 - 7, yOffset), "-", { colours[1] }); + DrawText(rt, screenCoords + ScreenCoordsXY(43 - 7, yOffset), "-", { colours[1] }); + DrawText(rt, screenCoords + ScreenCoordsXY(113 - 7, yOffset), "-", { colours[1] }); } if (windowTileInspectorSelectedIndex != -1) @@ -1097,7 +1097,7 @@ static uint64_t PageDisabledWidgets[] = { terrainNameId = surfaceStyle->NameStringId; auto ft = Formatter(); ft.Add(terrainNameId); - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_SURFACE_TERAIN, ft, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_SURFACE_TERAIN, ft, { colours[1] }); // Edge texture name StringId terrainEdgeNameId = kStringIdEmpty; @@ -1106,7 +1106,7 @@ static uint64_t PageDisabledWidgets[] = { terrainEdgeNameId = edgeStyle->NameStringId; ft = Formatter(); ft.Add(terrainEdgeNameId); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_SURFACE_EDGE, ft, { colours[1] }); // Land ownership @@ -1124,14 +1124,14 @@ static uint64_t PageDisabledWidgets[] = { ft = Formatter(); ft.Add(landOwnership); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_SURFACE_OWNERSHIP, ft, { colours[1] }); // Water level ft = Formatter(); ft.Add(tileElement->AsSurface()->GetWaterHeight()); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 33 }, STR_TILE_INSPECTOR_SURFACE_WATER_LEVEL, ft, { colours[1] }); @@ -1140,19 +1140,19 @@ static uint64_t PageDisabledWidgets[] = { screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_GROUPBOX_DETAILS].left + 7, widgets[WIDX_SURFACE_SPINNER_HEIGHT].top }; - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); // Current base height screenCoords.x = windowPos.x + widgets[WIDX_SURFACE_SPINNER_HEIGHT].left + 3; ft = Formatter(); ft.Add(tileElement->BaseHeight); - DrawTextBasic(rt, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); + DrawText(rt, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); // Raised corners screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_GROUPBOX_DETAILS].left + 7, widgets[WIDX_SURFACE_CHECK_CORNER_E].top }; - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_SURFACE_CORNERS, {}, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_SURFACE_CORNERS, {}, { colours[1] }); break; } case TileElementType::Path: @@ -1168,7 +1168,7 @@ static uint64_t PageDisabledWidgets[] = { { auto ft = Formatter(); ft.Add(surfaceObj->NameStringId); - DrawTextBasic( + DrawText( rt, screenCoords, STR_TILE_INSPECTOR_FOOTPATH_SURFACE_NAME, ft, { Drawing::Colour::white }); } @@ -1178,7 +1178,7 @@ static uint64_t PageDisabledWidgets[] = { { auto ft = Formatter(); ft.Add(railingsObj->NameStringId); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_FOOTPATH_RAILINGS_NAME, ft, { Drawing::Colour::white }); } @@ -1189,7 +1189,7 @@ static uint64_t PageDisabledWidgets[] = { auto footpathEntry = reinterpret_cast(footpathObj->GetLegacyData()); auto ft = Formatter(); ft.Add(footpathEntry->string_idx); - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_PATH_NAME, ft, { Drawing::Colour::white }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_PATH_NAME, ft, { Drawing::Colour::white }); } // Path addition @@ -1201,13 +1201,13 @@ static uint64_t PageDisabledWidgets[] = { : static_cast(STR_UNKNOWN_OBJECT_TYPE); auto ft = Formatter(); ft.Add(additionNameId); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 2 * 11 }, STR_TILE_INSPECTOR_PATH_ADDITIONS, ft, { Drawing::Colour::white }); } else { - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 2 * 11 }, STR_TILE_INSPECTOR_PATH_ADDITIONS_NONE, {}, { Drawing::Colour::white }); } @@ -1216,18 +1216,18 @@ static uint64_t PageDisabledWidgets[] = { // Raise / lower label screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_GROUPBOX_DETAILS].left + 7, widgets[WIDX_PATH_SPINNER_HEIGHT].top }; - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); // Current base height screenCoords.x = windowPos.x + widgets[WIDX_PATH_SPINNER_HEIGHT].left + 3; auto ft = Formatter(); ft.Add(tileElement->BaseHeight); - DrawTextBasic(rt, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); + DrawText(rt, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); // Path connections screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_GROUPBOX_DETAILS].left + 7, widgets[WIDX_PATH_CHECK_EDGE_W].top }; - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_PATH_CONNECTED_EDGES, {}, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_PATH_CONNECTED_EDGES, {}, { colours[1] }); break; } @@ -1240,14 +1240,14 @@ static uint64_t PageDisabledWidgets[] = { // Ride ID auto ft = Formatter(); ft.Add(id); - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_TRACK_RIDE_ID, ft, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_TRACK_RIDE_ID, ft, { colours[1] }); // Ride name if (rideTile != nullptr) { ft = Formatter(); rideTile->formatNameTo(ft); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_TRACK_RIDE_NAME, ft, { colours[1] }); } @@ -1256,18 +1256,18 @@ static uint64_t PageDisabledWidgets[] = { const auto& rtd = GetRideTypeDescriptor(trackElement->GetRideType()); ft = Formatter(); ft.Add(rtd.Naming.Name); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_TRACK_RIDE_TYPE, ft, { colours[1] }); // Track ft = Formatter(); ft.Add(trackElement->GetTrackType()); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 33 }, STR_TILE_INSPECTOR_TRACK_PIECE_ID, ft, { colours[1] }); ft = Formatter(); ft.Add(trackElement->GetSequenceIndex()); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 44 }, STR_TILE_INSPECTOR_TRACK_SEQUENCE, ft, { colours[1] }); if (trackElement->IsStation()) { @@ -1275,7 +1275,7 @@ static uint64_t PageDisabledWidgets[] = { ft = Formatter(); ft.Add(STR_COMMA16); ft.Add(stationIndex.ToUnderlying()); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 55 }, STR_TILE_INSPECTOR_STATION_INDEX, ft, { colours[1] }); } @@ -1285,26 +1285,26 @@ static uint64_t PageDisabledWidgets[] = { ft = Formatter(); ft.Add(STR_STRING); ft.Add(stationNone); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 55 }, STR_TILE_INSPECTOR_STATION_INDEX, ft, { colours[1] }); } ft = Formatter(); ft.Add(ColourSchemeNames[trackElement->GetColourScheme()]); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 66 }, STR_TILE_INSPECTOR_COLOUR_SCHEME, ft, { colours[1] }); // Properties // Raise / lower label screenCoords.y = windowPos.y + widgets[WIDX_TRACK_SPINNER_HEIGHT].top; - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); // Current base height screenCoords.x = windowPos.x + widgets[WIDX_TRACK_SPINNER_HEIGHT].left + 3; ft = Formatter(); ft.Add(tileElement->BaseHeight); - DrawTextBasic(rt, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); + DrawText(rt, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); break; } @@ -1314,7 +1314,7 @@ static uint64_t PageDisabledWidgets[] = { // Age auto ft = Formatter(); ft.Add(tileElement->AsSmallScenery()->GetAge()); - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_SCENERY_AGE, ft, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_SCENERY_AGE, ft, { colours[1] }); // Quadrant value const auto* sceneryEntry = tileElement->AsSmallScenery()->GetEntry(); @@ -1329,7 +1329,7 @@ static uint64_t PageDisabledWidgets[] = { }; ft = Formatter(); ft.Add(_quadrantStringIdx[quadrant]); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_SCENERY_QUADRANT, ft, { colours[1] }); } @@ -1337,30 +1337,30 @@ static uint64_t PageDisabledWidgets[] = { // Scenery ID ft = Formatter(); ft.Add(tileElement->AsSmallScenery()->GetEntryIndex()); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_SCENERY_ENTRY_IDX, ft, { colours[1] }); // Properties // Raise / Lower screenCoords.y = windowPos.y + widgets[WIDX_SCENERY_SPINNER_HEIGHT].top; - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); // Current base height screenCoords.x = windowPos.x + widgets[WIDX_SCENERY_SPINNER_HEIGHT].left + 3; ft = Formatter(); ft.Add(tileElement->BaseHeight); - DrawTextBasic(rt, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); + DrawText(rt, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); // Quarter tile screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_GROUPBOX_DETAILS].left + 7, widgets[WIDX_SCENERY_CHECK_QUARTER_E].top }; - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_SCENERY_QUADRANT_LABEL, {}, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_SCENERY_QUADRANT_LABEL, {}, { colours[1] }); // Collision screenCoords.y = windowPos.y + widgets[WIDX_SCENERY_CHECK_COLLISION_E].top; - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_COLLISSION, {}, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_COLLISSION, {}, { colours[1] }); break; } @@ -1370,14 +1370,14 @@ static uint64_t PageDisabledWidgets[] = { // Entrance type auto ft = Formatter(); ft.Add(EntranceTypeStringIds[tileElement->AsEntrance()->GetEntranceType()]); - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_ENTRANCE_TYPE, ft, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_ENTRANCE_TYPE, ft, { colours[1] }); if (tileElement->AsEntrance()->GetEntranceType() == ENTRANCE_TYPE_PARK_ENTRANCE) { // TODO: Make this work with Left/Right park entrance parts ft = Formatter(); ft.Add(ParkEntranceGetIndex({ _toolMap, tileElement->GetBaseZ() })); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_ENTRANCE_ENTRANCE_ID, ft, { colours[1] }); } @@ -1388,14 +1388,14 @@ static uint64_t PageDisabledWidgets[] = { if (tileElement->AsEntrance()->GetEntranceType() == ENTRANCE_TYPE_RIDE_ENTRANCE) { // Ride entrance ID - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_ENTRANCE_ENTRANCE_ID, ft, { colours[1] }); } else { // Ride exit ID - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_ENTRANCE_EXIT_ID, ft, { colours[1] }); } @@ -1406,7 +1406,7 @@ static uint64_t PageDisabledWidgets[] = { // Entrance part ft = Formatter(); ft.Add(ParkEntrancePartStringIds[tileElement->AsEntrance()->GetSequenceIndex()]); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_ENTRANCE_PART, ft, { colours[1] }); } @@ -1415,7 +1415,7 @@ static uint64_t PageDisabledWidgets[] = { // Ride ID ft = Formatter(); ft.Add(tileElement->AsEntrance()->GetRideIndex()); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_ENTRANCE_RIDE_ID, ft, { colours[1] }); // Station index @@ -1423,7 +1423,7 @@ static uint64_t PageDisabledWidgets[] = { ft = Formatter(); ft.Add(STR_COMMA16); ft.Add(stationIndex.ToUnderlying()); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 33 }, STR_TILE_INSPECTOR_STATION_INDEX, ft, { colours[1] }); } @@ -1431,13 +1431,13 @@ static uint64_t PageDisabledWidgets[] = { // Properties // Raise / Lower screenCoords.y = windowPos.y + widgets[WIDX_ENTRANCE_SPINNER_HEIGHT].top; - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); // Current base height screenCoords.x = windowPos.x + widgets[WIDX_ENTRANCE_SPINNER_HEIGHT].left + 3; ft = Formatter(); ft.Add(tileElement->BaseHeight); - DrawTextBasic(rt, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); + DrawText(rt, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); break; } @@ -1447,7 +1447,7 @@ static uint64_t PageDisabledWidgets[] = { // Type auto ft = Formatter(); ft.Add(tileElement->AsWall()->GetEntryIndex()); - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_WALL_TYPE, ft, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_WALL_TYPE, ft, { colours[1] }); // Banner info auto banner = tileElement->AsWall()->GetBanner(); @@ -1455,13 +1455,13 @@ static uint64_t PageDisabledWidgets[] = { { ft = Formatter(); banner->formatTextTo(ft); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_ENTRY_BANNER_TEXT, ft, { colours[1] }); } else { - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_ENTRY_BANNER_NONE, {}, { colours[1] }); } @@ -1469,22 +1469,22 @@ static uint64_t PageDisabledWidgets[] = { // Properties // Raise / lower label screenCoords.y = windowPos.y + widgets[WIDX_WALL_SPINNER_HEIGHT].top; - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); // Current base height screenCoords.x = windowPos.x + widgets[WIDX_WALL_SPINNER_HEIGHT].left + 3; ft = Formatter(); ft.Add(tileElement->BaseHeight); - DrawTextBasic(rt, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); + DrawText(rt, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); // Slope label screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_GROUPBOX_DETAILS].left + 7, widgets[WIDX_WALL_DROPDOWN_SLOPE].top }; - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_WALL_SLOPE, {}, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_WALL_SLOPE, {}, { colours[1] }); // Animation frame label screenCoords.y = windowPos.y + widgets[WIDX_WALL_SPINNER_ANIMATION_FRAME].top; - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_WALL_ANIMATION_FRAME, {}, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_WALL_ANIMATION_FRAME, {}, { colours[1] }); // Current animation frame auto colour = colours[1]; @@ -1495,7 +1495,7 @@ static uint64_t PageDisabledWidgets[] = { screenCoords.x = windowPos.x + widgets[WIDX_WALL_SPINNER_ANIMATION_FRAME].left + 3; ft = Formatter(); ft.Add(tileElement->AsWall()->GetAnimationFrame()); - DrawTextBasic(rt, screenCoords, STR_FORMAT_INTEGER, ft, { colour }); + DrawText(rt, screenCoords, STR_FORMAT_INTEGER, ft, { colour }); break; } @@ -1507,12 +1507,12 @@ static uint64_t PageDisabledWidgets[] = { ObjectEntryIndex largeSceneryType = sceneryElement->GetEntryIndex(); auto ft = Formatter(); ft.Add(largeSceneryType); - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_LARGE_SCENERY_TYPE, ft, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_LARGE_SCENERY_TYPE, ft, { colours[1] }); // Part ID ft = Formatter(); ft.Add(sceneryElement->GetSequenceIndex()); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_LARGE_SCENERY_PIECE_ID, ft, { colours[1] }); @@ -1526,14 +1526,14 @@ static uint64_t PageDisabledWidgets[] = { { ft = Formatter(); banner->formatTextTo(ft); - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_ENTRY_BANNER_TEXT, ft, { colours[1] }); } } else { - DrawTextBasic( + DrawText( rt, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_ENTRY_BANNER_NONE, {}, { colours[1] }); } @@ -1541,13 +1541,13 @@ static uint64_t PageDisabledWidgets[] = { // Properties // Raise / lower label screenCoords.y = windowPos.y + widgets[WIDX_LARGE_SCENERY_SPINNER_HEIGHT].top; - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); // Current base height screenCoords.x = windowPos.x + widgets[WIDX_LARGE_SCENERY_SPINNER_HEIGHT].left + 3; ft = Formatter(); ft.Add(tileElement->BaseHeight); - DrawTextBasic(rt, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); + DrawText(rt, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); break; } @@ -1560,24 +1560,24 @@ static uint64_t PageDisabledWidgets[] = { { Formatter ft; banner->formatTextTo(ft); - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_ENTRY_BANNER_TEXT, ft, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_ENTRY_BANNER_TEXT, ft, { colours[1] }); } // Properties // Raise / lower label screenCoords.y = windowPos.y + widgets[WIDX_BANNER_SPINNER_HEIGHT].top; - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_BASE_HEIGHT_FULL, {}, { colours[1] }); // Current base height screenCoords.x = windowPos.x + widgets[WIDX_BANNER_SPINNER_HEIGHT].left + 3; auto ft = Formatter(); ft.Add(tileElement->BaseHeight); - DrawTextBasic(rt, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); + DrawText(rt, screenCoords, STR_FORMAT_INTEGER, ft, { colours[1] }); // Blocked paths screenCoords.y += 28; screenCoords.x = windowPos.x + widgets[WIDX_GROUPBOX_DETAILS].left + 7; - DrawTextBasic(rt, screenCoords, STR_TILE_INSPECTOR_BANNER_BLOCKED_PATHS, {}, { colours[1] }); + DrawText(rt, screenCoords, STR_TILE_INSPECTOR_BANNER_BLOCKED_PATHS, {}, { colours[1] }); break; } @@ -1650,7 +1650,7 @@ static uint64_t PageDisabledWidgets[] = { auto eyeFormatter = Formatter(); eyeFormatter.Add(STR_STRING); eyeFormatter.Add(kEyeString); - DrawTextBasic(rt, screenCoords + ScreenCoordsXY{ 2, 1 }, stringFormat, eyeFormatter); + DrawText(rt, screenCoords + ScreenCoordsXY{ 2, 1 }, stringFormat, eyeFormatter); } const auto type = tileElement->GetType(); @@ -1725,26 +1725,25 @@ static uint64_t PageDisabledWidgets[] = { ft = Formatter(); ft.Add(STR_FORMAT_INTEGER); ft.Add(tileElement->BaseHeight); - DrawTextBasic(rt, screenCoords + ScreenCoordsXY{ kBaseHeightColumnXY.x, 0 }, stringFormat, ft); + DrawText(rt, screenCoords + ScreenCoordsXY{ kBaseHeightColumnXY.x, 0 }, stringFormat, ft); // Clearance height ft = Formatter(); ft.Add(STR_FORMAT_INTEGER); ft.Add(clearanceHeight); - DrawTextBasic(rt, screenCoords + ScreenCoordsXY{ kClearanceHeightColumnXY.x, 0 }, stringFormat, ft); + DrawText(rt, screenCoords + ScreenCoordsXY{ kClearanceHeightColumnXY.x, 0 }, stringFormat, ft); // Direction ft = Formatter(); ft.Add(STR_FORMAT_INTEGER); ft.Add(tileElement->GetDirection()); - DrawTextBasic(rt, screenCoords + ScreenCoordsXY{ kDirectionColumnXY.x, 0 }, stringFormat, ft); + DrawText(rt, screenCoords + ScreenCoordsXY{ kDirectionColumnXY.x, 0 }, stringFormat, ft); // Checkmarks for ghost and last for tile if (ghost) - DrawTextBasic( - rt, screenCoords + ScreenCoordsXY{ kGhostFlagColumnXY.x, 0 }, stringFormat, checkboxFormatter); + DrawText(rt, screenCoords + ScreenCoordsXY{ kGhostFlagColumnXY.x, 0 }, stringFormat, checkboxFormatter); if (last) - DrawTextBasic(rt, screenCoords + ScreenCoordsXY{ kLastFlagColumnXY.x, 0 }, stringFormat, checkboxFormatter); + DrawText(rt, screenCoords + ScreenCoordsXY{ kLastFlagColumnXY.x, 0 }, stringFormat, checkboxFormatter); screenCoords.y -= kScrollableRowHeight; i++; diff --git a/src/openrct2-ui/windows/TitleVersion.cpp b/src/openrct2-ui/windows/TitleVersion.cpp index df6086f237..d512b71884 100644 --- a/src/openrct2-ui/windows/TitleVersion.cpp +++ b/src/openrct2-ui/windows/TitleVersion.cpp @@ -28,12 +28,12 @@ namespace OpenRCT2::Ui::Windows { // Write name and version information const auto whiteOutline = ColourWithFlags{ Drawing::Colour::white }.withFlag(ColourFlag::withOutline, true); - DrawTextBasic(rt, windowPos, gVersionInfoFull, { whiteOutline }); + DrawText(rt, windowPos, gVersionInfoFull, { whiteOutline }); width = Drawing::getStringWidth(gVersionInfoFull, FontStyle::medium); // Write platform information constexpr const char platformInfo[] = OPENRCT2_PLATFORM " (" OPENRCT2_ARCHITECTURE ")"; - DrawTextBasic(rt, windowPos + ScreenCoordsXY(0, kListRowHeight), platformInfo, { whiteOutline }); + DrawText(rt, windowPos + ScreenCoordsXY(0, kListRowHeight), platformInfo, { whiteOutline }); width = std::max(width, Drawing::getStringWidth(platformInfo, FontStyle::medium)) + kTextOffset; } }; diff --git a/src/openrct2-ui/windows/TopToolbar.cpp b/src/openrct2-ui/windows/TopToolbar.cpp index d4f40f335f..5da22ace29 100644 --- a/src/openrct2-ui/windows/TopToolbar.cpp +++ b/src/openrct2-ui/windows/TopToolbar.cpp @@ -1423,7 +1423,7 @@ namespace OpenRCT2::Ui::Windows if (getGameState().cheats.disableClearanceChecks) { auto colour = ColourWithFlags{ Drawing::Colour::darkOrange }.withFlag(ColourFlag::withOutline, true); - DrawTextBasic( + DrawText( rt, screenPos + ScreenCoordsXY{ 26, 2 }, STR_OVERLAY_CLEARANCE_CHECKS_DISABLED, {}, { colour, TextAlignment::right }); } @@ -1489,7 +1489,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(Network::GetNumVisiblePlayers()); auto colour = ColourWithFlags{ Drawing::Colour::white }.withFlag(ColourFlag::withOutline, true); - DrawTextBasic(rt, screenPos + ScreenCoordsXY{ 23, 1 }, STR_COMMA16, ft, { colour, TextAlignment::right }); + DrawText(rt, screenPos + ScreenCoordsXY{ 23, 1 }, STR_COMMA16, ft, { colour, TextAlignment::right }); } if (widgets[WIDX_ROTATE_ANTI_CLOCKWISE].type != WidgetType::empty) diff --git a/src/openrct2-ui/windows/TrackDesignPlace.cpp b/src/openrct2-ui/windows/TrackDesignPlace.cpp index 64dd8790cd..c45d53d464 100644 --- a/src/openrct2-ui/windows/TrackDesignPlace.cpp +++ b/src/openrct2-ui/windows/TrackDesignPlace.cpp @@ -390,7 +390,7 @@ namespace OpenRCT2::Ui::Windows ft.Add(_placementCost); const auto& priceWidget = widgets[WIDX_PRICE]; const auto priceCoords = windowPos + ScreenCoordsXY{ priceWidget.left, priceWidget.top }; - DrawTextBasic(rt, priceCoords, STR_COST_LABEL, ft, { TextAlignment::centre }); + DrawText(rt, priceCoords, STR_COST_LABEL, ft, { TextAlignment::centre }); } } diff --git a/src/openrct2-ui/windows/TrackList.cpp b/src/openrct2-ui/windows/TrackList.cpp index e8245e85d8..28e7863f58 100644 --- a/src/openrct2-ui/windows/TrackList.cpp +++ b/src/openrct2-ui/windows/TrackList.cpp @@ -483,7 +483,7 @@ namespace OpenRCT2::Ui::Windows const auto shortPath = shortenPath(path, width, FontStyle::medium); auto ft = Formatter(); ft.Add(shortPath.c_str()); - DrawTextBasic( + DrawText( rt, windowPos + ScreenCoordsXY{ 0, height - kDebugPathHeight - 3 }, STR_STRING, ft, { colours[1] }); // TODO Check dpi } @@ -554,17 +554,17 @@ namespace OpenRCT2::Ui::Windows // Stats ft = Formatter(); ft.Add(_loadedTrackDesign->statistics.ratings.excitement); - DrawTextBasic(rt, screenPos, STR_TRACK_LIST_EXCITEMENT_RATING, ft); + DrawText(rt, screenPos, STR_TRACK_LIST_EXCITEMENT_RATING, ft); screenPos.y += kListRowHeight; ft = Formatter(); ft.Add(_loadedTrackDesign->statistics.ratings.intensity); - DrawTextBasic(rt, screenPos, STR_TRACK_LIST_INTENSITY_RATING, ft); + DrawText(rt, screenPos, STR_TRACK_LIST_INTENSITY_RATING, ft); screenPos.y += kListRowHeight; ft = Formatter(); ft.Add(_loadedTrackDesign->statistics.ratings.nausea); - DrawTextBasic(rt, screenPos, STR_TRACK_LIST_NAUSEA_RATING, ft); + DrawText(rt, screenPos, STR_TRACK_LIST_NAUSEA_RATING, ft); screenPos.y += kListRowHeight + 4; // Information for tracked rides. @@ -578,7 +578,7 @@ namespace OpenRCT2::Ui::Windows // Holes ft = Formatter(); ft.Add(_loadedTrackDesign->statistics.holes); - DrawTextBasic(rt, screenPos, STR_HOLES, ft); + DrawText(rt, screenPos, STR_HOLES, ft); screenPos.y += kListRowHeight; } else @@ -586,13 +586,13 @@ namespace OpenRCT2::Ui::Windows // Maximum speed ft = Formatter(); ft.Add(ToHumanReadableSpeed(_loadedTrackDesign->statistics.maxSpeed << 16)); - DrawTextBasic(rt, screenPos, STR_MAX_SPEED, ft); + DrawText(rt, screenPos, STR_MAX_SPEED, ft); screenPos.y += kListRowHeight; // Average speed ft = Formatter(); ft.Add(ToHumanReadableSpeed(_loadedTrackDesign->statistics.averageSpeed << 16)); - DrawTextBasic(rt, screenPos, STR_AVERAGE_SPEED, ft); + DrawText(rt, screenPos, STR_AVERAGE_SPEED, ft); screenPos.y += kListRowHeight; } @@ -609,19 +609,19 @@ namespace OpenRCT2::Ui::Windows // Maximum positive vertical Gs ft = Formatter(); ft.Add(_loadedTrackDesign->statistics.maxPositiveVerticalG); - DrawTextBasic(rt, screenPos, STR_MAX_POSITIVE_VERTICAL_G, ft); + DrawText(rt, screenPos, STR_MAX_POSITIVE_VERTICAL_G, ft); screenPos.y += kListRowHeight; // Maximum negative vertical Gs ft = Formatter(); ft.Add(_loadedTrackDesign->statistics.maxNegativeVerticalG); - DrawTextBasic(rt, screenPos, STR_MAX_NEGATIVE_VERTICAL_G, ft); + DrawText(rt, screenPos, STR_MAX_NEGATIVE_VERTICAL_G, ft); screenPos.y += kListRowHeight; // Maximum lateral Gs ft = Formatter(); ft.Add(_loadedTrackDesign->statistics.maxLateralG); - DrawTextBasic(rt, screenPos, STR_MAX_LATERAL_G, ft); + DrawText(rt, screenPos, STR_MAX_LATERAL_G, ft); screenPos.y += kListRowHeight; if (_loadedTrackDesign->statistics.totalAirTime != 0) @@ -629,7 +629,7 @@ namespace OpenRCT2::Ui::Windows // Total air time ft = Formatter(); ft.Add(ToHumanReadableAirTime(_loadedTrackDesign->statistics.totalAirTime)); - DrawTextBasic(rt, screenPos, STR_TOTAL_AIR_TIME, ft); + DrawText(rt, screenPos, STR_TOTAL_AIR_TIME, ft); screenPos.y += kListRowHeight; } } @@ -639,13 +639,13 @@ namespace OpenRCT2::Ui::Windows // Drops ft = Formatter(); ft.Add(_loadedTrackDesign->statistics.drops); - DrawTextBasic(rt, screenPos, STR_DROPS, ft); + DrawText(rt, screenPos, STR_DROPS, ft); screenPos.y += kListRowHeight; // Drop height is multiplied by 0.75 ft = Formatter(); ft.Add((_loadedTrackDesign->statistics.highestDropHeight * 3) / 4); - DrawTextBasic(rt, screenPos, STR_HIGHEST_DROP_HEIGHT, ft); + DrawText(rt, screenPos, STR_HIGHEST_DROP_HEIGHT, ft); screenPos.y += kListRowHeight; } @@ -653,7 +653,7 @@ namespace OpenRCT2::Ui::Windows { ft = Formatter(); ft.Add(_loadedTrackDesign->statistics.inversions); - DrawTextBasic(rt, screenPos, STR_INVERSIONS, ft); + DrawText(rt, screenPos, STR_INVERSIONS, ft); screenPos.y += kListRowHeight; } @@ -666,7 +666,7 @@ namespace OpenRCT2::Ui::Windows ft = Formatter(); ft.Add(_loadedTrackDesign->statistics.spaceRequired.x); ft.Add(_loadedTrackDesign->statistics.spaceRequired.y); - DrawTextBasic(rt, screenPos, STR_TRACK_LIST_SPACE_REQUIRED, ft); + DrawText(rt, screenPos, STR_TRACK_LIST_SPACE_REQUIRED, ft); screenPos.y += kListRowHeight; } @@ -674,7 +674,7 @@ namespace OpenRCT2::Ui::Windows { ft = Formatter(); ft.Add(_loadedTrackDesign->gameStateData.cost); - DrawTextBasic(rt, screenPos, STR_TRACK_LIST_COST_AROUND, ft); + DrawText(rt, screenPos, STR_TRACK_LIST_COST_AROUND, ft); } } @@ -690,7 +690,7 @@ namespace OpenRCT2::Ui::Windows if (_trackDesigns.empty()) { // No track designs - DrawTextBasic(rt, screenCoords - ScreenCoordsXY{ 0, 1 }, STR_NO_TRACK_DESIGNS_OF_THIS_TYPE); + DrawText(rt, screenCoords - ScreenCoordsXY{ 0, 1 }, STR_NO_TRACK_DESIGNS_OF_THIS_TYPE); return; } } @@ -713,7 +713,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(STR_BUILD_CUSTOM_DESIGN); - DrawTextBasic(rt, screenCoords - ScreenCoordsXY{ 0, 1 }, stringId, ft); + DrawText(rt, screenCoords - ScreenCoordsXY{ 0, 1 }, stringId, ft); screenCoords.y += kScrollableRowHeight; listIndex++; } @@ -740,7 +740,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add(STR_TRACK_LIST_NAME_FORMAT); ft.Add(_trackDesigns[i].name.c_str()); - DrawTextBasic(rt, screenCoords - ScreenCoordsXY{ 0, 1 }, stringId, ft); + DrawText(rt, screenCoords - ScreenCoordsXY{ 0, 1 }, stringId, ft); } screenCoords.y += kScrollableRowHeight; diff --git a/src/openrct2-ui/windows/ViewClipping.cpp b/src/openrct2-ui/windows/ViewClipping.cpp index edb27ed5a0..e243fb4804 100644 --- a/src/openrct2-ui/windows/ViewClipping.cpp +++ b/src/openrct2-ui/windows/ViewClipping.cpp @@ -294,7 +294,7 @@ namespace OpenRCT2::Ui::Windows // Clip height value auto screenCoords = this->windowPos + ScreenCoordsXY{ 8, this->widgets[WIDX_CLIP_HEIGHT_VALUE].top }; - DrawTextBasic(rt, screenCoords, STR_VIEW_CLIPPING_HEIGHT_VALUE, {}, { this->colours[0] }); + DrawText(rt, screenCoords, STR_VIEW_CLIPPING_HEIGHT_VALUE, {}, { this->colours[0] }); screenCoords = this->windowPos + ScreenCoordsXY{ this->widgets[WIDX_CLIP_HEIGHT_VALUE].left + 1, this->widgets[WIDX_CLIP_HEIGHT_VALUE].top }; @@ -308,7 +308,7 @@ namespace OpenRCT2::Ui::Windows ft.Add(static_cast(gClipHeight)); // Printing the raw value. - DrawTextBasic(rt, screenCoords, STR_FORMAT_INTEGER, ft, { this->colours[0] }); + DrawText(rt, screenCoords, STR_FORMAT_INTEGER, ft, { this->colours[0] }); break; } case DisplayType::DisplayUnits: @@ -319,7 +319,7 @@ namespace OpenRCT2::Ui::Windows // Height label is Units. auto ft = Formatter(); ft.Add((MakeFixed1dp(gClipHeight, 0) / 2 - MakeFixed1dp(7, 0))); - DrawTextBasic( + DrawText( rt, screenCoords, STR_UNIT1DP_NO_SUFFIX, ft, { this->colours[0] }); // Printing the value in Height Units. } @@ -335,7 +335,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add( MakeFixed2dp(gClipHeight, 0) / 2 * 1.5f - MakeFixed2dp(10, 50)); - DrawTextBasic(rt, screenCoords, STR_UNIT2DP_SUFFIX_METRES, ft, { this->colours[0] }); + DrawText(rt, screenCoords, STR_UNIT2DP_SUFFIX_METRES, ft, { this->colours[0] }); break; } case MeasurementFormat::Imperial: @@ -343,7 +343,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add( MakeFixed1dp(gClipHeight, 0) / 2.0f * 5 - MakeFixed1dp(35, 0)); - DrawTextBasic(rt, screenCoords, STR_UNIT1DP_SUFFIX_FEET, ft, { this->colours[0] }); + DrawText(rt, screenCoords, STR_UNIT1DP_SUFFIX_FEET, ft, { this->colours[0] }); break; } } diff --git a/src/openrct2-ui/windows/Water.cpp b/src/openrct2-ui/windows/Water.cpp index 8adfcf69c1..d6d3bb7b97 100644 --- a/src/openrct2-ui/windows/Water.cpp +++ b/src/openrct2-ui/windows/Water.cpp @@ -161,8 +161,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(gLandToolSize); - DrawTextBasic( - rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::centre }); + DrawText(rt, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::centre }); } if (!(getGameState().park.flags & PARK_FLAGS_NO_MONEY)) @@ -173,7 +172,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(_waterToolRaiseCost); - DrawTextBasic(rt, screenCoords, STR_RAISE_COST_AMOUNT, ft, { TextAlignment::centre }); + DrawText(rt, screenCoords, STR_RAISE_COST_AMOUNT, ft, { TextAlignment::centre }); } screenCoords.y += 10; @@ -182,7 +181,7 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(_waterToolLowerCost); - DrawTextBasic(rt, screenCoords, STR_LOWER_COST_AMOUNT, ft, { TextAlignment::centre }); + DrawText(rt, screenCoords, STR_LOWER_COST_AMOUNT, ft, { TextAlignment::centre }); } } } diff --git a/src/openrct2/drawing/Drawing.String.cpp b/src/openrct2/drawing/Drawing.String.cpp index d562c3aeea..de2e08626b 100644 --- a/src/openrct2/drawing/Drawing.String.cpp +++ b/src/openrct2/drawing/Drawing.String.cpp @@ -295,13 +295,13 @@ namespace OpenRCT2::Drawing RenderTarget& rt, const ScreenCoordsXY& coords, int32_t numLines, const utf8* text, FontStyle fontStyle) { ScreenCoordsXY screenCoords(rt.x, rt.y); - DrawTextBasic(rt, screenCoords, "", { Colour::black, fontStyle }); + DrawText(rt, screenCoords, "", { Colour::black, fontStyle }); screenCoords = coords; for (int32_t i = 0; i <= numLines; i++) { int32_t width = getStringWidth(text, fontStyle); - DrawTextBasic(rt, screenCoords - ScreenCoordsXY{ width / 2, 0 }, text, { kColourNull, fontStyle }); + DrawText(rt, screenCoords - ScreenCoordsXY{ width / 2, 0 }, text, { kColourNull, fontStyle }); const utf8* ch = text; const utf8* nextCh = nullptr; @@ -393,7 +393,7 @@ namespace OpenRCT2::Drawing int32_t numLines, lineHeight, lineY; ScreenCoordsXY screenCoords(rt.x, rt.y); - DrawTextBasic(rt, screenCoords, "", { colour }); + DrawText(rt, screenCoords, "", { colour }); u8string wrappedString; wrapString(FormatStringID(format, args), width, FontStyle::small, &wrappedString, &numLines); @@ -432,7 +432,7 @@ namespace OpenRCT2::Drawing } screenCoords = { coords.x - halfWidth, lineY }; - DrawTextBasic(rt, screenCoords, buffer, { kColourNull, FontStyle::small }); + DrawText(rt, screenCoords, buffer, { kColourNull, FontStyle::small }); if (numCharactersDrawn > numCharactersToDraw) { diff --git a/src/openrct2/drawing/Drawing.cpp b/src/openrct2/drawing/Drawing.cpp index 8b57019fb2..ebc3cc5b6f 100644 --- a/src/openrct2/drawing/Drawing.cpp +++ b/src/openrct2/drawing/Drawing.cpp @@ -928,8 +928,8 @@ void DebugRT(RenderTarget& rt) GfxDrawLine(rt, { topLeft, topLeft + ScreenCoordsXY{ 4, 0 } }, PaletteIndex::pi136); const auto str = std::to_string(rt.x); - DrawTextBasic(rt, ScreenCoordsXY{ rt.x, rt.y }, str, { Colour::white, FontStyle::tiny }); + DrawText(rt, ScreenCoordsXY{ rt.x, rt.y }, str, { Colour::white, FontStyle::tiny }); const auto str2 = std::to_string(rt.y); - DrawTextBasic(rt, ScreenCoordsXY{ rt.x, rt.y + 6 }, str2, { Colour::white, FontStyle::tiny }); + DrawText(rt, ScreenCoordsXY{ rt.x, rt.y + 6 }, str2, { Colour::white, FontStyle::tiny }); } diff --git a/src/openrct2/drawing/Text.cpp b/src/openrct2/drawing/Text.cpp index 5c630abcbb..f7ee70618d 100644 --- a/src/openrct2/drawing/Text.cpp +++ b/src/openrct2/drawing/Text.cpp @@ -57,7 +57,7 @@ public: const utf8* buffer = Buffer.data(); for (int32_t line = 0; line < LineCount; ++line) { - DrawTextBasic(rt, lineCoords, buffer, tempPaint); + DrawText(rt, lineCoords, buffer, tempPaint); tempPaint.colour = OpenRCT2::Drawing::kColourNull; buffer = GetStringEnd(buffer) + 1; lineCoords.y += LineHeight; @@ -93,19 +93,19 @@ static void drawTextUnderline( } } -void DrawTextBasic(RenderTarget& rt, const ScreenCoordsXY& coords, StringId format, TextPaint textPaint) +void DrawText(RenderTarget& rt, const ScreenCoordsXY& coords, StringId format, TextPaint textPaint) { - DrawTextBasic(rt, coords, LanguageGetString(format), textPaint); + DrawText(rt, coords, LanguageGetString(format), textPaint); } -void DrawTextBasic(RenderTarget& rt, const ScreenCoordsXY& coords, StringId format, const Formatter& ft, TextPaint textPaint) +void DrawText(RenderTarget& rt, const ScreenCoordsXY& coords, StringId format, const Formatter& ft, TextPaint textPaint) { utf8 buffer[512]; FormatStringLegacy(buffer, sizeof(buffer), format, ft.Data()); - DrawTextBasic(rt, coords, buffer, textPaint); + DrawText(rt, coords, buffer, textPaint); } -void DrawTextBasic(RenderTarget& rt, const ScreenCoordsXY& coords, u8string_view string, TextPaint textPaint) +void DrawText(RenderTarget& rt, const ScreenCoordsXY& coords, u8string_view string, TextPaint textPaint) { auto noFormatting = textPaint.flags.has(TextPaintFlag::noFormatting); int32_t width = getStringWidth(string, textPaint.fontStyle, noFormatting); @@ -143,7 +143,7 @@ void DrawTextEllipsised( utf8 buffer[512]; FormatStringLegacy(buffer, sizeof(buffer), format, ft.Data()); clipString(buffer, width, textPaint.fontStyle); - DrawTextBasic(rt, coords, buffer, textPaint); + DrawText(rt, coords, buffer, textPaint); } void DrawTextEllipsised( @@ -152,7 +152,7 @@ void DrawTextEllipsised( utf8 buffer[512]{}; string.copy(buffer, std::min(string.length(), sizeof(buffer) - 1)); clipString(buffer, width, textPaint.fontStyle); - DrawTextBasic(rt, coords, string, textPaint); + DrawText(rt, coords, string, textPaint); } int32_t DrawTextWrapped(RenderTarget& rt, const ScreenCoordsXY& coords, int32_t width, StringId format, TextPaint textPaint) diff --git a/src/openrct2/drawing/Text.h b/src/openrct2/drawing/Text.h index 19e0c202cf..112a62d987 100644 --- a/src/openrct2/drawing/Text.h +++ b/src/openrct2/drawing/Text.h @@ -211,12 +211,11 @@ struct TextPaint } }; -void DrawTextBasic( - OpenRCT2::Drawing::RenderTarget& rt, const ScreenCoordsXY& coords, StringId format, TextPaint textPaint = {}); -void DrawTextBasic( +void DrawText(OpenRCT2::Drawing::RenderTarget& rt, const ScreenCoordsXY& coords, StringId format, TextPaint textPaint = {}); +void DrawText( OpenRCT2::Drawing::RenderTarget& rt, const ScreenCoordsXY& coords, StringId format, const OpenRCT2::Formatter& ft, TextPaint textPaint = {}); -void DrawTextBasic( +void DrawText( OpenRCT2::Drawing::RenderTarget& rt, const ScreenCoordsXY& coords, u8string_view string, TextPaint textPaint = {}); void DrawTextEllipsised( diff --git a/src/openrct2/interface/Chat.cpp b/src/openrct2/interface/Chat.cpp index fa79e7f733..02d77a88d2 100644 --- a/src/openrct2/interface/Chat.cpp +++ b/src/openrct2/interface/Chat.cpp @@ -307,7 +307,7 @@ static int32_t ChatHistoryDrawString(RenderTarget& rt, const char* text, const S int32_t lineY = screenCoords.y; for (int32_t line = 0; line <= numLines; ++line) { - DrawTextBasic(rt, { screenCoords.x, lineY - (numLines * lineHeight) }, bufferPtr, { OpenRCT2::Drawing::kColourNull }); + DrawText(rt, { screenCoords.x, lineY - (numLines * lineHeight) }, bufferPtr, { OpenRCT2::Drawing::kColourNull }); bufferPtr = GetStringEnd(bufferPtr) + 1; lineY += lineHeight; } diff --git a/src/openrct2/object/MusicObject.cpp b/src/openrct2/object/MusicObject.cpp index be6e469293..a9375e2569 100644 --- a/src/openrct2/object/MusicObject.cpp +++ b/src/openrct2/object/MusicObject.cpp @@ -96,7 +96,7 @@ namespace OpenRCT2 if (_hasPreview) GfxDrawSprite(rt, ImageId(_previewImageId), { 0, 0 }); else - DrawTextBasic(rt, { x, y }, STR_WINDOW_NO_IMAGE, {}, { TextAlignment::centre }); + DrawText(rt, { x, y }, STR_WINDOW_NO_IMAGE, {}, { TextAlignment::centre }); } bool MusicObject::HasPreview() const diff --git a/src/openrct2/object/WaterObject.cpp b/src/openrct2/object/WaterObject.cpp index 0715fe8b61..5d64f0452a 100644 --- a/src/openrct2/object/WaterObject.cpp +++ b/src/openrct2/object/WaterObject.cpp @@ -62,7 +62,7 @@ namespace OpenRCT2 { // Write (no image) auto screenCoords = ScreenCoordsXY{ width / 2, height / 2 }; - DrawTextBasic(rt, screenCoords, STR_WINDOW_NO_IMAGE, {}, { TextAlignment::centre }); + DrawText(rt, screenCoords, STR_WINDOW_NO_IMAGE, {}, { TextAlignment::centre }); } void WaterObject::ReadJson([[maybe_unused]] IReadObjectContext* context, json_t& root) diff --git a/src/openrct2/paint/Painter.cpp b/src/openrct2/paint/Painter.cpp index 863d54bffb..6266dd0265 100644 --- a/src/openrct2/paint/Painter.cpp +++ b/src/openrct2/paint/Painter.cpp @@ -96,7 +96,7 @@ void Painter::PaintReplayNotice(RenderTarget& rt, const char* text) screenCoords.x = screenCoords.x - stringWidth; if (((getGameState().currentTicks >> 1) & 0xF) > 4) - DrawTextBasic(rt, screenCoords, buffer, { OpenRCT2::Drawing::Colour::saturatedRed }); + DrawText(rt, screenCoords, buffer, { OpenRCT2::Drawing::Colour::saturatedRed }); // Make area dirty so the text doesn't get drawn over the last GfxSetDirtyBlocks({ screenCoords, screenCoords + ScreenCoordsXY{ stringWidth, 16 } }); @@ -133,7 +133,7 @@ void Painter::PaintFPS(RenderTarget& rt) screenCoords.y = kTopToolbarHeight + 3; } - DrawTextBasic(rt, screenCoords, buffer, { OpenRCT2::Drawing::Colour::white }); + DrawText(rt, screenCoords, buffer, { OpenRCT2::Drawing::Colour::white }); // Make area dirty so the text doesn't get drawn over the last GfxSetDirtyBlocks({ { screenCoords - ScreenCoordsXY{ 16, 4 } }, { rt.lastStringPos.x + 16, screenCoords.y + 16 } });