Inventory screen keys/buttons display fix

When a key/button name is too long, and its bound to an inventory element, its
display in the inventory screen misaligns the item it is bound to, even pushing
it out of the inventory frame.

This commit limits its display to the maximum of 6 characters the inventory
screen allows.
This commit is contained in:
Jaime Moreira 2022-05-21 22:59:02 -04:00
parent b59077b972
commit 0419cd7931

View file

@ -139,7 +139,7 @@ CL_DrawInventory(void)
}
}
Com_sprintf(string, sizeof(string), "%6s %3i %s", bind,
Com_sprintf(string, sizeof(string), "%6.6s %3i %s", bind,
cl.inventory[item], cl.configstrings[CS_ITEMS + item]);
if (item != selected)