From: divverent Date: Fri, 31 Oct 2008 10:07:43 +0000 (+0000) Subject: if in menu, make con_closeontoggleconsole.integer also enable the toggleconsole key X-Git-Tag: xonotic-v0.1.0preview~2048 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=8aeb705ddefa4a3c9176df32b629b3638f4a329a if in menu, make con_closeontoggleconsole.integer also enable the toggleconsole key git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8541 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/keys.c b/keys.c index 81cc1bee..1d135536 100644 --- a/keys.c +++ b/keys.c @@ -1060,6 +1060,16 @@ Key_Event (int key, char ascii, qboolean down) return; } + // handle toggleconsole in menu too + if (keydest == key_menu) + { + if (down && con_closeontoggleconsole.integer && bind && !strncmp(bind, "toggleconsole", strlen("toggleconsole")) && ascii != STRING_COLOR_TAG) + { + Con_ToggleConsole_f (); + tbl_keydest[key] = key_void; // key release should go nowhere (especially not to key_menu or key_game) + return; + } + } // ignore binds while a video is played, let the video system handle the key event if (cl_videoplaying)