mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-13 02:51:06 +00:00
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:
parent
d9d56760e1
commit
49451eea80
2 changed files with 29 additions and 24 deletions
|
@ -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) {
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue