mirror of https://github.com/OpenRCT2/OpenRCT2.git
Close #12993: Remove hardcoded {SMALLFONT}{BLACK} from tooltips
This commit is contained in:
parent
d0afa7947f
commit
9ec61fa5d2
File diff suppressed because it is too large
Load Diff
|
@ -50,7 +50,12 @@ void window_tooltip_reset(const ScreenCoordsXY& screenCoords)
|
|||
// Returns the width of the new tooltip text
|
||||
static int32_t FormatTextForTooltip(const OpenRCT2String& message)
|
||||
{
|
||||
format_string(_tooltipText, sizeof(_tooltipText), message.str, message.args.Data());
|
||||
utf8 tempBuffer[sizeof(gCommonStringFormatBuffer)];
|
||||
format_string(tempBuffer, sizeof(tempBuffer), message.str, message.args.Data());
|
||||
|
||||
OpenRCT2String formattedMessage{ STR_STRING_TOOLTIP, Formatter() };
|
||||
formattedMessage.args.Add<const char*>(tempBuffer);
|
||||
format_string(_tooltipText, sizeof(_tooltipText), formattedMessage.str, formattedMessage.args.Data());
|
||||
gCurrentFontSpriteBase = FONT_SPRITE_BASE_MEDIUM;
|
||||
|
||||
auto textWidth = gfx_get_string_width_new_lined(_tooltipText);
|
||||
|
|
Loading…
Reference in New Issue