Wrap string without drawing, useful to get the height of a wrapped string. Almost the same as gfx_draw_string_left_wrapped
| 314 | // Wrap string without drawing, useful to get the height of a wrapped string. |
| 315 | // Almost the same as gfx_draw_string_left_wrapped |
| 316 | int32_t ChatStringWrappedGetHeight(u8string_view args, int32_t width) |
| 317 | { |
| 318 | int32_t numLines; |
| 319 | wrapString(FormatStringID(STR_STRING, args), width, FontStyle::medium, nullptr, &numLines); |
| 320 | const int32_t lineHeight = FontGetLineHeight(FontStyle::medium); |
| 321 | return lineHeight * (numLines + 1); |
| 322 | } |
no test coverage detected