Menu code commit, Hexen 2 menus supported better (even includes sound in the menus now), menus are now mostly aligned and not underneath pictures anymore, Quake2 menus looking abit too

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3497 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Lance 2010-01-16 04:59:13 +00:00
parent 923c577172
commit 22a3c2bc6d
3 changed files with 325 additions and 116 deletions

View file

@ -545,10 +545,22 @@ void M_Keys_Key (int k)
{
char cmd[80];
int keys[2];
int mgt;
mgt = M_GameType();
if (mgt == MGT_HEXEN2)
S_LocalSound ("raven/menu1.wav");
else
S_LocalSound ("misc/menu1.wav");
if (bind_grab)
{ // defining a key
S_LocalSound ("misc/menu1.wav");
if (mgt == MGT_HEXEN2)
S_LocalSound ("raven/menu1.wav");
else
S_LocalSound ("misc/menu1.wav");
if (k == K_ESCAPE)
{
bind_grab = false;
@ -571,7 +583,11 @@ void M_Keys_Key (int k)
case K_LEFTARROW:
case K_UPARROW:
S_LocalSound ("misc/menu1.wav");
if (mgt == MGT_HEXEN2)
S_LocalSound ("raven/menu1.wav");
else
S_LocalSound ("misc/menu1.wav");
keys_cursor--;
if (keys_cursor < 0)
keys_cursor = numbindnames-1;
@ -579,7 +595,11 @@ void M_Keys_Key (int k)
case K_DOWNARROW:
case K_RIGHTARROW:
S_LocalSound ("misc/menu1.wav");
if (mgt == MGT_HEXEN2)
S_LocalSound ("raven/menu1.wav");
else
S_LocalSound ("misc/menu1.wav");
keys_cursor++;
if (keys_cursor >= numbindnames)
keys_cursor = 0;
@ -587,7 +607,12 @@ void M_Keys_Key (int k)
case K_ENTER: // go into bind mode
M_FindKeysForCommand (bindnames[keys_cursor].command, keys);
S_LocalSound ("misc/menu2.wav");
if (mgt == MGT_HEXEN2)
S_LocalSound ("raven/menu2.wav");
else
S_LocalSound ("misc/menu2.wav");
if (keys[1] != -1)
M_UnbindCommand (bindnames[keys_cursor].command);
bind_grab = true;
@ -595,7 +620,11 @@ void M_Keys_Key (int k)
case K_BACKSPACE: // delete bindings
case K_DEL: // delete bindings
S_LocalSound ("misc/menu2.wav");
if (mgt == MGT_HEXEN2)
S_LocalSound ("raven/menu1.wav");
else
S_LocalSound ("misc/menu1.wav");
M_UnbindCommand (bindnames[keys_cursor].command);
break;
}