mirror of https://github.com/OpenRCT2/OpenRCT2.git
Allow passing TextPaint to DrawTextBasic()
This commit is contained in:
parent
ac1e9abb56
commit
13e7ec6e8e
|
@ -116,20 +116,32 @@ static void DrawText(
|
|||
DrawText(dpi, coords, paint, buffer);
|
||||
}
|
||||
|
||||
void DrawTextBasic(
|
||||
rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, rct_string_id format, const void* args, TextPaint textPaint)
|
||||
{
|
||||
gCurrentFontSpriteBase = textPaint.SpriteBase;
|
||||
DrawText(dpi, coords, textPaint, format, args);
|
||||
}
|
||||
|
||||
void DrawTextBasic(
|
||||
rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, rct_string_id format, const Formatter& ft, TextPaint textPaint)
|
||||
{
|
||||
DrawTextBasic(dpi, coords, format, ft.Data(), textPaint);
|
||||
}
|
||||
|
||||
void DrawTextBasic(
|
||||
rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, rct_string_id format, const void* args, colour_t colour,
|
||||
TextAlignment alignment, bool underline)
|
||||
{
|
||||
TextPaint textPaint = { colour, FontSpriteBase::MEDIUM, underline ? TextUnderline::On : TextUnderline::Off, alignment };
|
||||
gCurrentFontSpriteBase = FontSpriteBase::MEDIUM;
|
||||
DrawText(dpi, coords, textPaint, format, args);
|
||||
DrawTextBasic(dpi, coords, format, args, textPaint);
|
||||
}
|
||||
|
||||
void DrawTextBasic(
|
||||
rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, rct_string_id format, const Formatter& ft, colour_t colour,
|
||||
TextAlignment alignment, bool underline)
|
||||
{
|
||||
return DrawTextBasic(dpi, coords, format, ft.Data(), colour, alignment, underline);
|
||||
DrawTextBasic(dpi, coords, format, ft.Data(), colour, alignment, underline);
|
||||
}
|
||||
|
||||
void DrawTextEllipsised(
|
||||
|
|
|
@ -138,6 +138,10 @@ public:
|
|||
int32_t GetLineCount();
|
||||
};
|
||||
|
||||
void DrawTextBasic(
|
||||
rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, rct_string_id format, const Formatter& ft, TextPaint textPaint);
|
||||
void DrawTextBasic(
|
||||
rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, rct_string_id format, const void* args, TextPaint textPaint);
|
||||
void DrawTextBasic(
|
||||
rct_drawpixelinfo* dpi, const ScreenCoordsXY& coords, rct_string_id format, const Formatter& ft, colour_t colour,
|
||||
TextAlignment alignment = TextAlignment::LEFT, bool underline = false);
|
||||
|
|
Loading…
Reference in New Issue