mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
Menu_CenterPic now centers the pic (horizontally) as intended
This commit is contained in:
parent
b1b848ae4a
commit
29c19ca243
1 changed files with 7 additions and 1 deletions
|
@ -169,8 +169,14 @@ bi_Menu_CenterPic (progs_t *pr)
|
|||
int y = G_INT (pr, OFS_PARM1);
|
||||
const char *name = G_STRING (pr, OFS_PARM2);
|
||||
menu_pic_t *pic = malloc (sizeof (menu_pic_t));
|
||||
qpic_t *qpic = Draw_CachePic (name, 1);
|
||||
|
||||
pic->x = x;
|
||||
if (!qpic) {
|
||||
free (pic);
|
||||
return;
|
||||
}
|
||||
|
||||
pic->x = x - qpic->width / 2;
|
||||
pic->y = y;
|
||||
pic->name = strdup (name);
|
||||
pic->next = menu->pics;
|
||||
|
|
Loading…
Reference in a new issue