summaryrefslogtreecommitdiff
path: root/src/ui/ui_atoms.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/ui_atoms.c')
-rw-r--r--src/ui/ui_atoms.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/ui/ui_atoms.c b/src/ui/ui_atoms.c
index 64efa91..a3033c4 100644
--- a/src/ui/ui_atoms.c
+++ b/src/ui/ui_atoms.c
@@ -294,6 +294,36 @@ static void UI_CalcPostGameStats( void ) {
}
+static void UI_MessageMode_f( void )
+{
+ char *arg = UI_Argv( 0 );
+
+ trap_Cvar_Set( "ui_sayBuffer", "" );
+
+ switch( arg[ 11 ] )
+ {
+ default:
+ case '\0':
+ // Global
+ uiInfo.chatTeam = qfalse;
+ break;
+
+ case '2':
+ // Team
+ uiInfo.chatTeam = qtrue;
+ break;
+ }
+
+ trap_Key_SetCatcher( KEYCATCH_UI );
+ Menus_CloseByName( "say" );
+ Menus_CloseByName( "say_team" );
+
+ if( uiInfo.chatTeam )
+ Menus_ActivateByName( "say_team" );
+ else
+ Menus_ActivateByName( "say" );
+}
+
/*
=================
@@ -377,6 +407,13 @@ qboolean UI_ConsoleCommand( int realTime )
}
}
+ if( Q_stricmp ( cmd, "messagemode" ) == 0 ||
+ Q_stricmp ( cmd, "messagemode2" ) == 0 )
+ {
+ UI_MessageMode_f();
+ return qtrue;
+ }
+
return qfalse;
}