mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-23 06:56:17 +00:00
M_StringHeight: Guarantee that there will be enough vertical space in a Menu Message for the relevant lines
This commit is contained in:
parent
d0ce442850
commit
3cbbcfd253
1 changed files with 7 additions and 4 deletions
|
|
@ -14,11 +14,14 @@ struct menumessage_s menumessage;
|
|||
//
|
||||
static inline size_t M_StringHeight(const char *string)
|
||||
{
|
||||
size_t h = 8, i;
|
||||
size_t h = 8, i, len = strlen(string);
|
||||
|
||||
for (i = 0; i < strlen(string); i++)
|
||||
if (string[i] == '\n')
|
||||
h += 8;
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
if (string[i] != '\n' && i != len-1)
|
||||
continue;
|
||||
h += 8;
|
||||
}
|
||||
|
||||
return h;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue