restore MN_StringHeight function (#1662)

This commit is contained in:
Roman Fomin 2024-04-25 09:13:48 +00:00 committed by GitHub
parent 7c174fef72
commit 2f98be6785
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3720,7 +3720,15 @@ void MN_SetHUFontKerning(void)
int MN_StringHeight(const char *string)
{
return SHORT(hu_font[0]->height);
int height = SHORT(hu_font[0]->height);
for (int i = 0; string[i]; ++i)
{
if (string[i] == '\n')
{
height += SHORT(hu_font[0]->height);
}
}
return height;
}
// [FG] alternative text for missing menu graphics lumps