Use the new menu/console bingings.

Now, the console toggle will always work (so long as the console is
toggleable in the first place).
This commit is contained in:
Bill Currie 2011-12-10 13:22:36 +09:00
parent d9d56760e1
commit 49451eea80
2 changed files with 29 additions and 24 deletions

View file

@ -461,7 +461,8 @@ C_KeyEvent (knum_t key, short unicode, qboolean down)
return; return;
} }
if (down && (key == QFK_ESCAPE || unicode == '\x1b')) { if (down) {
if (key == key_togglemenu) {
switch (key_dest) { switch (key_dest) {
case key_menu: case key_menu:
Menu_Leave (); Menu_Leave ();
@ -486,6 +487,10 @@ C_KeyEvent (knum_t key, short unicode, qboolean down)
default: default:
Sys_Error ("Bad key_dest"); Sys_Error ("Bad key_dest");
} }
} else if (key == key_toggleconsole) {
ToggleConsole_f ();
return;
}
} }
if (key_dest == key_menu) { if (key_dest == key_menu) {

View file

@ -857,7 +857,7 @@ Key_Event (knum_t key, short unicode, qboolean down)
} }
// handle escape specially, so the user can never unbind it // handle escape specially, so the user can never unbind it
if (unicode == '\x1b' || key == QFK_ESCAPE) { if (key == key_togglemenu || key == key_toggleconsole) {
Key_Console (key, unicode); Key_Console (key, unicode);
return; return;
} }