forked from rosebudai/OpenRCT2-Web
Rename DrawTextBasic() to DrawText()
This commit is contained in:
63 files changed
+430
-454
No files matched your search
@@ -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<StringId>(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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -511,7 +511,7 @@ namespace OpenRCT2::Ui
|
||||
|
||||
auto ft = Formatter();
|
||||
ft.Add<utf8*>(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
|
||||
|
||||
@@ -699,13 +699,13 @@ void CustomListView::PaintHeading(
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<StringId>(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<StringId>(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<const char*>(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]{};
|
||||
|
||||
@@ -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<Drawing::Colour>(_colour.value_or(0)) });
|
||||
DrawText(_rt, { x, y }, text, { static_cast<Drawing::Colour>(_colour.value_or(0)) });
|
||||
}
|
||||
};
|
||||
} // namespace OpenRCT2::Scripting
|
||||
|
||||
@@ -269,7 +269,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto checkmark = Formatter();
|
||||
checkmark.Add<StringId>(STR_STRING);
|
||||
checkmark.Add<char*>(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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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] });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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<int32_t>(_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<int32_t>(actual_month);
|
||||
DrawTextBasic(
|
||||
DrawText(
|
||||
rt, windowPos + ScreenCoordsXY{ _xRcol, monthBox.top + 2 }, STR_FORMAT_MONTH, ft,
|
||||
{ colours[1], TextAlignment::right });
|
||||
|
||||
ft = Formatter();
|
||||
ft.Add<int32_t>(_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<int32_t>(_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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -184,8 +184,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<uint16_t>(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<money64>(_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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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<int32_t>(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] });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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 });
|
||||
}
|
||||
|
||||
@@ -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<StringId>(researchItem->GetCategoryInventionString());
|
||||
DrawTextBasic(rt, screenPos, STR_INVENTION_RESEARCH_GROUP, ft);
|
||||
DrawText(rt, screenPos, STR_INVENTION_RESEARCH_GROUP, ft);
|
||||
}
|
||||
|
||||
void onPrepareDraw() override
|
||||
|
||||
@@ -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<uint16_t>(numSelected);
|
||||
ft.Add<uint16_t>(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<PeepAnimationsObject*>(_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<StringId>(STR_STRING);
|
||||
ft.Add<const utf8*>(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;
|
||||
|
||||
@@ -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<StringId>(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<money64>(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<uint16_t>((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<StringId>(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<money64>(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<money64>(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<money64>(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<int16_t>(
|
||||
std::clamp<int16_t>(static_cast<int16_t>(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<money64>(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<money64>(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<uint16_t>((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<uint16_t>(((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<uint16_t>(((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<StringId>(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<money64>(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<money64>(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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -437,7 +437,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto ft = Formatter();
|
||||
ft.Add<StringId>(STR_FINANCES_SUMMARY_MONTH_HEADING);
|
||||
ft.Add<uint16_t>(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<money64>(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<money64>(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<uint16_t>(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<money64>(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<money64>(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<money64>(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<money64>(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<uint16_t>(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<money64>(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<money64>(currentValue);
|
||||
DrawTextBasic(rt, _graphBounds.Point1 - ScreenCoordsXY{ 0, 11 }, fmt, ft);
|
||||
DrawText(rt, _graphBounds.Point1 - ScreenCoordsXY{ 0, 11 }, fmt, ft);
|
||||
|
||||
// Graph
|
||||
Rectangle::fillInset(
|
||||
|
||||
@@ -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<money64>(_windowFootpathCost);
|
||||
DrawTextBasic(rt, screenCoords, STR_COST_LABEL, ft, { TextAlignment::centre });
|
||||
DrawText(rt, screenCoords, STR_COST_LABEL, ft, { TextAlignment::centre });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<money64>(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<uint32_t>(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<StringId>(DateDayNames[day]);
|
||||
ft.Add<int16_t>(month);
|
||||
ft.Add<int16_t>(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<int16_t>(temperature);
|
||||
DrawTextBasic(rt, screenCoords + ScreenCoordsXY{ 0, 6 }, format, ft);
|
||||
DrawText(rt, screenCoords + ScreenCoordsXY{ 0, 6 }, format, ft);
|
||||
screenCoords.x += 30;
|
||||
|
||||
// Current weather
|
||||
|
||||
@@ -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<uint16_t>(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<uint16_t>(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<StringId>(_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<money64>(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<money64>(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<money64>(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<uint16_t>(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<uint16_t>(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<uint16_t>(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<uint16_t>(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<uint32_t>(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<int32_t>(peep->x);
|
||||
ft.Add<int32_t>(peep->y);
|
||||
ft.Add<int32_t>(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<int32_t>(peep->DestinationX);
|
||||
ft.Add<int32_t>(peep->DestinationY);
|
||||
ft.Add<int32_t>(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<int32_t>(peep->PathfindGoal.y);
|
||||
ft.Add<int32_t>(peep->PathfindGoal.z);
|
||||
ft.Add<int32_t>(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<int32_t>(point.y);
|
||||
ft.Add<int32_t>(point.z);
|
||||
ft.Add<int32_t>(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;
|
||||
|
||||
@@ -472,7 +472,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
screenCoords = windowPos + ScreenCoordsXY{ 4, widgets[WIDX_GUEST_LIST].bottom + 2 };
|
||||
auto ft = Formatter();
|
||||
ft.Add<int32_t>(static_cast<int32_t>(_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<StringId>(STR_GUESTS_COUNT_COMMA_SEP);
|
||||
ft.Add<uint32_t>(group.NumGuests);
|
||||
DrawTextBasic(rt, { 326, y }, format, ft, { TextAlignment::right });
|
||||
DrawText(rt, { 326, y }, format, ft, { TextAlignment::right });
|
||||
}
|
||||
y += kSummarisedGuestsRowHeight;
|
||||
index++;
|
||||
|
||||
@@ -193,7 +193,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto trackName = _trackName.c_str();
|
||||
auto ft = Formatter();
|
||||
ft.Add<const char*>(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<StringId>(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<int32_t>(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<int32_t>(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<int32_t>(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<uint16_t>(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<uint16_t>(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<uint16_t>(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<int32_t>(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<int32_t>(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<int32_t>(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<int32_t>(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<uint16_t>(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<uint16_t>(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<uint16_t>(td.statistics.spaceRequired.x);
|
||||
ft.Add<uint16_t>(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<money64>(td.gameStateData.cost);
|
||||
DrawTextBasic(rt, screenPos, STR_TRACK_LIST_COST_AROUND, ft);
|
||||
DrawText(rt, screenPos, STR_TRACK_LIST_COST_AROUND, ft);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -276,8 +276,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto ft = Formatter();
|
||||
ft.Add<uint16_t>(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<money64>(_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<money64>(_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<money64>(price);
|
||||
DrawTextBasic(rt, screenCoords, STR_COST_AMOUNT, ft, { TextAlignment::centre });
|
||||
DrawText(rt, screenCoords, STR_COST_AMOUNT, ft, { TextAlignment::centre });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -404,8 +404,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<uint16_t>(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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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<StringId>(DateDayNames[_preview.day]);
|
||||
ft.Add<int16_t>(_preview.month);
|
||||
ft.Add<int16_t>(_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<money64>(_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<money64>(_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<money64>(_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<money64>(_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<StringId>(STR_RIGHTGUILLEMET);
|
||||
DrawTextBasic(rt, { 0, y }, stringId, ft);
|
||||
DrawText(rt, { 0, y }, stringId, ft);
|
||||
}
|
||||
|
||||
// Folders get a folder icon
|
||||
|
||||
@@ -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] });
|
||||
}
|
||||
|
||||
@@ -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<uint16_t>(_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<int16_t>(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<int16_t>(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<uint16_t>(_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<uint16_t>(_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<uint16_t>(_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<int32_t>(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<int32_t>(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<int32_t>(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] });
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<const char*>(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<const char*>(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<const char*>(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<uint16_t>(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<Network::Permission>(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<uint16_t>(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;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -363,7 +363,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
Widget* spinnerWidget = &widgets[WIDX_WEEKS_SPINNER];
|
||||
auto ft = Formatter();
|
||||
ft.Add<int16_t>(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<money64>(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<money64>(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
|
||||
|
||||
@@ -984,7 +984,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto designCountStringId = GetDesignsAvailableStringId(count);
|
||||
ft = Formatter();
|
||||
ft.Add<int32_t>(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<money64>(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
|
||||
|
||||
@@ -491,7 +491,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto ft = Formatter();
|
||||
ft.Add<StringId>(DateDayNames[newsItem.day - 1]);
|
||||
ft.Add<StringId>(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
|
||||
{
|
||||
|
||||
@@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1030,7 +1030,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<int32_t>(static_cast<int32_t>(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<int32_t>(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] });
|
||||
|
||||
|
||||
@@ -703,7 +703,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
// Current value
|
||||
Formatter ft;
|
||||
ft.Add<uint16_t>(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<uint32_t>(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<money64>(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<uint32_t>(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<uint32_t>(_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<uint32_t>(_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<uint32_t>(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<uint32_t>(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
|
||||
|
||||
|
||||
@@ -148,8 +148,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
windowPos.y + widgets[WIDX_PREVIEW].midY() };
|
||||
auto ft = Formatter();
|
||||
ft.Add<uint16_t>(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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -448,10 +448,10 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
auto ft = Formatter();
|
||||
ft.Add<StringId>(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<uint32_t>(Network::GetPlayerCommandsRan(player));
|
||||
DrawTextBasic(rt, screenCoords, STR_COMMANDS_RAN, ft);
|
||||
DrawText(rt, screenCoords, STR_COMMANDS_RAN, ft);
|
||||
|
||||
screenCoords.y += kListRowHeight;
|
||||
|
||||
ft = Formatter();
|
||||
ft.Add<uint32_t>(Network::GetPlayerMoneySpent(player));
|
||||
DrawTextBasic(rt, screenCoords, STR_MONEY_SPENT, ft);
|
||||
DrawText(rt, screenCoords, STR_MONEY_SPENT, ft);
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
@@ -367,7 +367,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
// Expected
|
||||
ft = Formatter();
|
||||
ft.Add<StringId>(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<StringId>(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<money64>(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
|
||||
|
||||
@@ -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<StringId>(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<int16_t>(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<int16_t>(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<int16_t>(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<uint16_t>(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<uint16_t>(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<uint16_t>(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<uint16_t>(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<StringId>(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<StringId>(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<uint32_t>(ride->ratings.nausea);
|
||||
ft.Add<StringId>(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<uint16_t>(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<int32_t>(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<int32_t>(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<fixed16_2dp>(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<int32_t>(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<fixed16_2dp>(ride->maxLateralG);
|
||||
DrawTextBasic(rt, screenCoords, stringId, ft);
|
||||
DrawText(rt, screenCoords, stringId, ft);
|
||||
screenCoords.y += kListRowHeight;
|
||||
|
||||
// Total 'air' time
|
||||
ft = Formatter();
|
||||
ft.Add<fixed32_2dp>(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<uint16_t>(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<int32_t>(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<uint16_t>(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<int16_t>(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<int32_t>(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<money64>(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<money64>(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<money64>(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<money64>(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<money64>(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<money64>(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<int16_t>(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<int32_t>(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<int16_t>(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<int16_t>(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<StringId>(GetShopItemDescriptor(shopItem).Naming.Plural);
|
||||
ft.Add<uint32_t>(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<StringId>(GetShopItemDescriptor(shopItem).Naming.Plural);
|
||||
ft.Add<uint32_t>(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<uint32_t>(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<uint32_t>(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<int16_t>(age);
|
||||
DrawTextBasic(rt, screenCoords, stringId, ft);
|
||||
DrawText(rt, screenCoords, stringId, ft);
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
@@ -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<money64>(_currentTrackPrice);
|
||||
DrawTextBasic(rt, screenCoords, STR_COST_LABEL, ft, { TextAlignment::centre });
|
||||
DrawText(rt, screenCoords, STR_COST_LABEL, ft, { TextAlignment::centre });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -616,7 +616,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
// Draw number of attractions on bottom
|
||||
auto ft = Formatter();
|
||||
ft.Add<uint16_t>(static_cast<uint16_t>(CountVisibleItems()));
|
||||
DrawTextBasic(
|
||||
DrawText(
|
||||
rt, windowPos + ScreenCoordsXY{ 4, widgets[WIDX_LIST].bottom + 2 }, ride_list_statusbar_count_strings[page],
|
||||
ft);
|
||||
}
|
||||
|
||||
@@ -367,7 +367,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
auto ft = Formatter();
|
||||
ft.Add<utf8*>(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<StringId>(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<StringId>(STR_COMPLETED_BY);
|
||||
ft.Add<StringId>(STR_STRING);
|
||||
ft.Add<const char*>(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];
|
||||
|
||||
@@ -909,7 +909,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<money64>(price);
|
||||
|
||||
// -14
|
||||
DrawTextBasic(
|
||||
DrawText(
|
||||
rt, windowPos + ScreenCoordsXY{ width - 0x1A, height - 13 }, STR_COST_LABEL, ft, { TextAlignment::right });
|
||||
}
|
||||
|
||||
|
||||
@@ -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<uint16_t>(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 });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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<const char*>(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<uint32_t>(_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;
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -941,13 +941,13 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<money64>(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<int32_t>(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<uint32_t>(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<uint32_t>(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<uint32_t>(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<uint32_t>(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<uint32_t>(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<uint32_t>(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<uint32_t>(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:
|
||||
|
||||
@@ -285,12 +285,12 @@ namespace OpenRCT2::Ui::Windows
|
||||
auto ft = Formatter();
|
||||
ft.Add<money64>(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<uint32_t>(_staffList.size());
|
||||
ft.Add<StringId>(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
|
||||
|
||||
@@ -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 });
|
||||
|
||||
|
||||
@@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1059,19 +1059,19 @@ static uint64_t PageDisabledWidgets[] = {
|
||||
auto tileCoords = TileCoordsXY{ _toolMap };
|
||||
auto ft = Formatter();
|
||||
ft.Add<int32_t>(tileCoords.x);
|
||||
DrawTextBasic(
|
||||
DrawText(
|
||||
rt, screenCoords + ScreenCoordsXY{ 43, yOffset }, STR_FORMAT_INTEGER, ft,
|
||||
{ colours[1], TextAlignment::right });
|
||||
ft = Formatter();
|
||||
ft.Add<int32_t>(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<StringId>(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<StringId>(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<StringId>(landOwnership);
|
||||
DrawTextBasic(
|
||||
DrawText(
|
||||
rt, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_SURFACE_OWNERSHIP, ft,
|
||||
{ colours[1] });
|
||||
|
||||
// Water level
|
||||
ft = Formatter();
|
||||
ft.Add<uint32_t>(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<int32_t>(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<StringId>(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<StringId>(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<const FootpathEntry*>(footpathObj->GetLegacyData());
|
||||
auto ft = Formatter();
|
||||
ft.Add<StringId>(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<StringId>(STR_UNKNOWN_OBJECT_TYPE);
|
||||
auto ft = Formatter();
|
||||
ft.Add<StringId>(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<int32_t>(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<int16_t>(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<StringId>(rtd.Naming.Name);
|
||||
DrawTextBasic(
|
||||
DrawText(
|
||||
rt, screenCoords + ScreenCoordsXY{ 0, 22 }, STR_TILE_INSPECTOR_TRACK_RIDE_TYPE, ft, { colours[1] });
|
||||
|
||||
// Track
|
||||
ft = Formatter();
|
||||
ft.Add<uint16_t>(trackElement->GetTrackType());
|
||||
DrawTextBasic(
|
||||
DrawText(
|
||||
rt, screenCoords + ScreenCoordsXY{ 0, 33 }, STR_TILE_INSPECTOR_TRACK_PIECE_ID, ft, { colours[1] });
|
||||
|
||||
ft = Formatter();
|
||||
ft.Add<uint16_t>(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<StringId>(STR_COMMA16);
|
||||
ft.Add<int16_t>(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<StringId>(STR_STRING);
|
||||
ft.Add<char*>(stationNone);
|
||||
DrawTextBasic(
|
||||
DrawText(
|
||||
rt, screenCoords + ScreenCoordsXY{ 0, 55 }, STR_TILE_INSPECTOR_STATION_INDEX, ft,
|
||||
{ colours[1] });
|
||||
}
|
||||
|
||||
ft = Formatter();
|
||||
ft.Add<StringId>(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<int32_t>(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<int16_t>(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<StringId>(_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<ObjectEntryIndex>(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<int32_t>(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<StringId>(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<StringId>(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<StringId>(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<RideId>(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<StringId>(STR_COMMA16);
|
||||
ft.Add<int16_t>(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<int32_t>(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<ObjectEntryIndex>(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<int32_t>(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<int32_t>(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<ObjectEntryIndex>(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<int16_t>(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<int32_t>(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<int32_t>(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<StringId>(STR_STRING);
|
||||
eyeFormatter.Add<char*>(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<StringId>(STR_FORMAT_INTEGER);
|
||||
ft.Add<int32_t>(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<StringId>(STR_FORMAT_INTEGER);
|
||||
ft.Add<int32_t>(clearanceHeight);
|
||||
DrawTextBasic(rt, screenCoords + ScreenCoordsXY{ kClearanceHeightColumnXY.x, 0 }, stringFormat, ft);
|
||||
DrawText(rt, screenCoords + ScreenCoordsXY{ kClearanceHeightColumnXY.x, 0 }, stringFormat, ft);
|
||||
|
||||
// Direction
|
||||
ft = Formatter();
|
||||
ft.Add<StringId>(STR_FORMAT_INTEGER);
|
||||
ft.Add<int32_t>(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++;
|
||||
|
||||
@@ -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<int16_t>(width, Drawing::getStringWidth(platformInfo, FontStyle::medium)) + kTextOffset;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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<int32_t>(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)
|
||||
|
||||
@@ -390,7 +390,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
ft.Add<money64>(_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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -483,7 +483,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
const auto shortPath = shortenPath(path, width, FontStyle::medium);
|
||||
auto ft = Formatter();
|
||||
ft.Add<utf8*>(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<fixed32_2dp>(_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<fixed32_2dp>(_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<fixed32_2dp>(_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<uint16_t>(_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<uint16_t>(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<uint16_t>(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<int32_t>(_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<int32_t>(_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<int32_t>(_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<int32_t>(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<uint16_t>(_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<uint16_t>((_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<uint16_t>(_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<uint16_t>(_loadedTrackDesign->statistics.spaceRequired.x);
|
||||
ft.Add<uint16_t>(_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<uint32_t>(_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<StringId>(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<StringId>(STR_TRACK_LIST_NAME_FORMAT);
|
||||
ft.Add<const utf8*>(_trackDesigns[i].name.c_str());
|
||||
DrawTextBasic(rt, screenCoords - ScreenCoordsXY{ 0, 1 }, stringId, ft);
|
||||
DrawText(rt, screenCoords - ScreenCoordsXY{ 0, 1 }, stringId, ft);
|
||||
}
|
||||
|
||||
screenCoords.y += kScrollableRowHeight;
|
||||
|
||||
@@ -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<int32_t>(static_cast<int32_t>(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<fixed16_1dp>((MakeFixed1dp<fixed16_1dp>(gClipHeight, 0) / 2 - MakeFixed1dp<fixed16_1dp>(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<fixed32_2dp>(
|
||||
MakeFixed2dp<fixed32_2dp>(gClipHeight, 0) / 2 * 1.5f - MakeFixed2dp<fixed32_2dp>(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<fixed16_1dp>(
|
||||
MakeFixed1dp<fixed16_1dp>(gClipHeight, 0) / 2.0f * 5 - MakeFixed1dp<fixed16_1dp>(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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,8 +161,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
auto ft = Formatter();
|
||||
ft.Add<uint16_t>(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<money64>(_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<money64>(_waterToolLowerCost);
|
||||
DrawTextBasic(rt, screenCoords, STR_LOWER_COST_AMOUNT, ft, { TextAlignment::centre });
|
||||
DrawText(rt, screenCoords, STR_LOWER_COST_AMOUNT, ft, { TextAlignment::centre });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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 });
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 } });
|
||||
|
||||
Reference in new issue
Block a user