1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00

Change gfx_draw_string_*_wrapped() to DrawTextWrapped()

This commit is contained in:
Gymnasiast
2021-02-27 17:17:17 +01:00
parent e2ebc9d43b
commit 3e536e2711
25 changed files with 97 additions and 102 deletions

View File

@@ -358,7 +358,7 @@ static void WidgetTextCentred(rct_drawpixelinfo* dpi, rct_window* w, rct_widgeti
ScreenCoordsXY coords = { (topLeft.x + r + 1) / 2 - 1, topLeft.y };
if (widget->type == WindowWidgetType::LabelCentred)
{
gfx_draw_string_centred_wrapped(dpi, ft.Data(), coords, widget->width() - 2, stringId, colour);
DrawTextWrapped(dpi, coords, widget->width() - 2, stringId, ft, { colour, TextAlignment::CENTRE });
}
else
{
@@ -407,7 +407,7 @@ static void WidgetText(rct_drawpixelinfo* dpi, rct_window* w, rct_widgetindex wi
ScreenCoordsXY coords = { l + 1, t };
if (widget->type == WindowWidgetType::LabelCentred)
{
gfx_draw_string_centred_wrapped(dpi, ft.Data(), coords, r - l, stringId, colour);
DrawTextWrapped(dpi, coords, r - l, stringId, ft, { colour, TextAlignment::CENTRE });
}
else
{