mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Replace GfxDrawStringNoFormatting() (#19414)
* Replace GfxDrawStringNoFormatting() * Unwrap static DrawText overload
This commit is contained in:
committed by
GitHub
parent
b56748bc82
commit
583b4ed0e6
@@ -1148,8 +1148,7 @@ static void WidgetTextBoxDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex wid
|
||||
{
|
||||
u8string wrappedString;
|
||||
GfxWrapString(widget.string, bottomRight.x - topLeft.x - 5, FontStyle::Medium, &wrappedString, nullptr);
|
||||
GfxDrawStringNoFormatting(
|
||||
dpi, { topLeft.x + 2, topLeft.y }, wrappedString.c_str(), { w.colours[1], FontStyle::Medium });
|
||||
DrawText(dpi, { topLeft.x + 2, topLeft.y }, { w.colours[1] }, wrappedString.c_str(), true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1159,7 +1158,7 @@ static void WidgetTextBoxDraw(DrawPixelInfo* dpi, WindowBase& w, WidgetIndex wid
|
||||
u8string wrappedString;
|
||||
GfxWrapString(gTextBoxInput, bottomRight.x - topLeft.x - 5 - 6, FontStyle::Medium, &wrappedString, nullptr);
|
||||
|
||||
GfxDrawStringNoFormatting(dpi, { topLeft.x + 2, topLeft.y }, wrappedString.c_str(), { w.colours[1], FontStyle::Medium });
|
||||
DrawText(dpi, { topLeft.x + 2, topLeft.y }, { w.colours[1] }, wrappedString.c_str(), true);
|
||||
|
||||
// Make a trimmed view of the string for measuring the width.
|
||||
int32_t curX = topLeft.x
|
||||
|
||||
Reference in New Issue
Block a user