------------------------------------------------------------------------

r4186 | acceptthis | 2013-01-29 03:25:21 +0000 (Tue, 29 Jan 2013) | 1 line

misc fixes for menus. mostly the quit menu, which can finally be used properly with a mouse.
------------------------------------------------------------------------


git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4184 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2013-03-12 22:41:34 +00:00
parent be21617b87
commit 80ab34a8f2
3 changed files with 14 additions and 11 deletions

View file

@ -311,8 +311,12 @@ void CL_Quit_f (void)
{
if (forcesaveprompt)
{
Cmd_ExecuteString("menu_quit", RESTRICT_LOCAL);
return;
forcesaveprompt =false;
if (Cmd_Exists("menu_quit"))
{
Cmd_ExecuteString("menu_quit", RESTRICT_LOCAL);
return;
}
}
TP_ExecTrigger("f_quit");

View file

@ -1508,9 +1508,9 @@ void M_RemoveAllMenus (void)
}
void M_MenuPop_f (void)
{
if (!firstmenu)
if (!currentmenu)
return;
M_RemoveMenu(firstmenu);
M_RemoveMenu(currentmenu);
}
void M_Complex_Draw(void)

View file

@ -432,7 +432,7 @@ int M_FindKeysForBind (char *command, int *keylist, int total)
b = keybindings[j][0];
if (!b)
continue;
if (!strncmp (b, command, l) )
if (!strncmp (b, command, l) && (!b[l] || b[l] == ' ' || b[l] == ';'))
{
keylist[count] = j;
count++;
@ -739,7 +739,7 @@ qboolean MC_Quit_Key (int key, menu_t *menu)
break;
default:
break;
return false;
}
return true;
@ -772,7 +772,7 @@ qboolean MC_SaveQuit_Key (int key, menu_t *menu)
break;
default:
break;
return false;
}
return true;
@ -825,12 +825,11 @@ void M_Menu_Quit_f (void)
MC_AddWhiteText(quitmenu, 64, 84, "You have unsaved settings ", false);
MC_AddWhiteText(quitmenu, 64, 92, " Would you like to ", false);
MC_AddWhiteText(quitmenu, 64, 100, " save them now? ", false);
MC_AddWhiteText(quitmenu, 64, 108, " [Y/N/ESC] ", false);
quitmenu->selecteditem = (menuoption_t *)
MC_AddConsoleCommand (quitmenu, 64, 116, "Yes", "menu_quit forcesave\n");
MC_AddConsoleCommand (quitmenu, 144,116, "No", "menu_quit force\n");
MC_AddConsoleCommand (quitmenu, 224,116, "Cancel", "menupop\n");
MC_AddConsoleCommand (quitmenu, 64, 116, "Yes", "menu_quit forcesave\n");
MC_AddConsoleCommand (quitmenu, 144,116, "No", "menu_quit force\n");
MC_AddConsoleCommand (quitmenu, 224,116, "Cancel", "menupop\n");
MC_AddBox (quitmenu, 56, 76, 25, 5);
break;