summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2003-09-01 20:46:28 +0000
committerTim Angus <tim@ngus.net>2003-09-01 20:46:28 +0000
commitc3f60ca5b8c6a76bc32559c3cbd4f4acaf413535 (patch)
tree88a24e45227aa134dd3a2bdba325411ff7e9117f /src/ui
parente390136fd151bfa813d250357815d4f38b1f927c (diff)
* Menus are now automatically closed upon death
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/ui_atoms.c16
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;