mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-23 02:41:58 -05:00
Close #12993: Remove hardcoded {SMALLFONT}{BLACK} from tooltips
This commit is contained in:
parent
d0afa7947f
commit
9ec61fa5d2
2 changed files with 521 additions and 516 deletions
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 a new issue