1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 14:02:59 +01:00

Remove Formatter::Common where not required (#12972)

* Remove Formatter::Common where not required

* Remove common from Guest window where possible
This commit is contained in:
Duncan
2020-09-28 01:09:08 +01:00
committed by GitHub
parent a1222fa4ca
commit 4ec10837a6
21 changed files with 252 additions and 226 deletions

View File

@@ -648,13 +648,13 @@ void CustomListView::PaintHeading(
if (sortOrder == ColumnSortOrder::Ascending)
{
auto ft = Formatter::Common();
auto ft = Formatter();
ft.Add<rct_string_id>(STR_UP);
DrawTextBasic(dpi, pos + ScreenCoordsXY{ size.width - 1, 0 }, STR_BLACK_STRING, ft, COLOUR_BLACK, TextAlignment::RIGHT);
}
else if (sortOrder == ColumnSortOrder::Descending)
{
auto ft = Formatter::Common();
auto ft = Formatter();
ft.Add<rct_string_id>(STR_DOWN);
DrawTextBasic(dpi, pos + ScreenCoordsXY{ size.width - 1, 0 }, STR_BLACK_STRING, ft, COLOUR_BLACK, TextAlignment::RIGHT);
}
@@ -665,7 +665,7 @@ void CustomListView::PaintCell(
{
rct_string_id stringId = isHighlighted ? STR_WINDOW_COLOUR_2_STRINGID : STR_BLACK_STRING;
auto ft = Formatter::Common();
auto ft = Formatter();
ft.Add<rct_string_id>(STR_STRING);
ft.Add<const char*>(text);
DrawTextEllipsised(dpi, pos, size.width, stringId, ft, COLOUR_BLACK);