summaryrefslogtreecommitdiff
path: root/src/client/cl_console.c
diff options
context:
space:
mode:
authorZack Middleton <zturtleman@gmail.com>2013-01-16 23:03:09 -0600
committerTim Angus <tim@ngus.net>2013-02-16 21:50:39 +0000
commitdc0b038ef622884bf17ce163088a8fba7309fb0f (patch)
tree48c814f93ebd61684e290f3a882ae529528b56dc /src/client/cl_console.c
parent720b4f23a620c4ab4fd11d77f0515de26675a467 (diff)
Add togglemenu command
Allow togglemenu to be run in binds while in menu or message mode.
Diffstat (limited to 'src/client/cl_console.c')
-rw-r--r--src/client/cl_console.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/client/cl_console.c b/src/client/cl_console.c
index e832910e..3b4fc2c6 100644
--- a/src/client/cl_console.c
+++ b/src/client/cl_console.c
@@ -79,6 +79,16 @@ void Con_ToggleConsole_f (void) {
}
/*
+===================
+Con_ToggleMenu_f
+===================
+*/
+void Con_ToggleMenu_f( void ) {
+ CL_KeyEvent( K_ESCAPE, qtrue, Sys_Milliseconds() );
+ CL_KeyEvent( K_ESCAPE, qfalse, Sys_Milliseconds() );
+}
+
+/*
================
Con_Clear_f
================
@@ -262,6 +272,7 @@ void Con_Init (void) {
CL_LoadConsoleHistory( );
Cmd_AddCommand ("toggleconsole", Con_ToggleConsole_f);
+ Cmd_AddCommand ("togglemenu", Con_ToggleMenu_f);
Cmd_AddCommand ("clear", Con_Clear_f);
Cmd_AddCommand ("condump", Con_Dump_f);
Cmd_SetCommandCompletionFunc( "condump", Cmd_CompleteTxtName );
@@ -275,10 +286,7 @@ Con_Shutdown
void Con_Shutdown(void)
{
Cmd_RemoveCommand("toggleconsole");
- Cmd_RemoveCommand("messagemode");
- Cmd_RemoveCommand("messagemode2");
- Cmd_RemoveCommand("messagemode3");
- Cmd_RemoveCommand("messagemode4");
+ Cmd_RemoveCommand("togglemenu");
Cmd_RemoveCommand("clear");
Cmd_RemoveCommand("condump");
}