Rename DrawTextBasic() to DrawText()

This commit is contained in:
Gymnasiast committed 2026-03-25 23:15:49 +01:00
1 parent 258b10ba13
commit 2398d91fb2
63 files changed
+430 -454

No files matched your search

+21 -21
View File
@@ -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] });
}