diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/ui_atoms.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/ui/ui_atoms.c b/src/ui/ui_atoms.c index 41f538ff..b8adacdd 100644 --- a/src/ui/ui_atoms.c +++ b/src/ui/ui_atoms.c @@ -368,11 +368,11 @@ qboolean UI_ConsoleCommand( int realTime ) return qtrue; } - if ( Q_stricmp (cmd, "menu") == 0 ) + if( Q_stricmp ( cmd, "menu" ) == 0 ) { arg1 = UI_Argv( 1 ); - if( Menu_Count() > 0 ) + if( Menu_Count( ) > 0 ) { trap_Key_SetCatcher( KEYCATCH_UI ); Menus_ActivateByName( arg1 ); @@ -380,6 +380,18 @@ qboolean UI_ConsoleCommand( int realTime ) } } + if( Q_stricmp ( cmd, "closemenus" ) == 0 ) + { + if( Menu_Count( ) > 0 ) + { + trap_Key_SetCatcher( trap_Key_GetCatcher( ) & ~KEYCATCH_UI ); + trap_Key_ClearStates( ); + trap_Cvar_Set( "cl_paused", "0" ); + Menus_CloseAll( ); + return qtrue; + } + } + if ( Q_stricmp (cmd, "ui_cdkey") == 0 ) { //UI_CDKeyMenu_f(); return qtrue; |