mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-26 14:30:48 +00:00
Menu: Some alignment fixes for scaled menus
This commit is contained in:
parent
ca4bab172e
commit
354d2ff789
1 changed files with 3 additions and 6 deletions
|
@ -334,7 +334,7 @@ static void
|
||||||
M_DrawCharacter(int cx, int cy, int num)
|
M_DrawCharacter(int cx, int cy, int num)
|
||||||
{
|
{
|
||||||
float scale = SCR_GetMenuScale();
|
float scale = SCR_GetMenuScale();
|
||||||
Draw_CharScaled(cx + ((viddef.width - 320 * (int)scale) >> 1), cy + ((viddef.height - 240 * (int)scale) >> 1), num, scale);
|
Draw_CharScaled(cx + ((int)(viddef.width - 320 * scale) >> 1), cy + ((int)(viddef.height - 240 * scale) >> 1), num, scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2606,10 +2606,7 @@ JoinServer_MenuInit(void)
|
||||||
|
|
||||||
s_joinserver_server_title.generic.type = MTYPE_SEPARATOR;
|
s_joinserver_server_title.generic.type = MTYPE_SEPARATOR;
|
||||||
s_joinserver_server_title.generic.name = "connect to...";
|
s_joinserver_server_title.generic.name = "connect to...";
|
||||||
if (scale > 1)
|
s_joinserver_server_title.generic.x = 80 * scale;
|
||||||
s_joinserver_server_title.generic.x = 80 * scale + (scale * 8);
|
|
||||||
else
|
|
||||||
s_joinserver_server_title.generic.x = 80;
|
|
||||||
s_joinserver_server_title.generic.y = 30;
|
s_joinserver_server_title.generic.y = 30;
|
||||||
|
|
||||||
for (i = 0; i < MAX_LOCAL_SERVERS; i++)
|
for (i = 0; i < MAX_LOCAL_SERVERS; i++)
|
||||||
|
@ -3619,7 +3616,7 @@ AddressBook_MenuInit(void)
|
||||||
int i;
|
int i;
|
||||||
float scale = SCR_GetMenuScale();
|
float scale = SCR_GetMenuScale();
|
||||||
|
|
||||||
s_addressbook_menu.x = viddef.width / scale / 2 - 142 / scale;
|
s_addressbook_menu.x = viddef.width / 2 - (142 * scale);
|
||||||
s_addressbook_menu.y = viddef.height / (2 * scale) - 58;
|
s_addressbook_menu.y = viddef.height / (2 * scale) - 58;
|
||||||
s_addressbook_menu.nitems = 0;
|
s_addressbook_menu.nitems = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue