diff options
| author | Tim Angus <tim@ngus.net> | 2007-11-02 20:42:47 +0000 | 
|---|---|---|
| committer | Tim Angus <tim@ngus.net> | 2007-11-02 20:42:47 +0000 | 
| commit | 3289f089c3b6f6196fe9508e7d3d48b32a42d10d (patch) | |
| tree | 00284abb075f2df331988b7398dbc82cf54352d8 /src/client | |
| parent | 580693963c553ca1b63fb62f70e3f048a3666991 (diff) | |
* s/ui_loading/ui_hideCursor/
* Hide cursor when using edit fields and binding keys
* Remove client side chat handling, moving it to UI module
* Remove target and last attacker message modes
* Add ui_developer cvar
* Fix edit field bug where cvar changes under it
* Add onTextEntry UI script event
* Give the user some feedback when binding keys
* Stop doing a UI refresh when primed (and remove cgame ui_loading sets)
* Move cg_drawSnapshot to bottom of the screen
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/cl_console.c | 85 | ||||
| -rw-r--r-- | src/client/cl_keys.c | 61 | ||||
| -rw-r--r-- | src/client/cl_scrn.c | 6 | 
3 files changed, 0 insertions, 152 deletions
diff --git a/src/client/cl_console.c b/src/client/cl_console.c index d740696d..0ad397b9 100644 --- a/src/client/cl_console.c +++ b/src/client/cl_console.c @@ -82,67 +82,6 @@ void Con_ToggleConsole_f (void) {  /*  ================ -Con_MessageMode_f -================ -*/ -void Con_MessageMode_f (void) { -	chat_playerNum = -1; -	chat_team = qfalse; -	Field_Clear( &chatField ); -	chatField.widthInChars = 30; - -	Key_SetCatcher( Key_GetCatcher( ) ^ KEYCATCH_MESSAGE ); -} - -/* -================ -Con_MessageMode2_f -================ -*/ -void Con_MessageMode2_f (void) { -	chat_playerNum = -1; -	chat_team = qtrue; -	Field_Clear( &chatField ); -	chatField.widthInChars = 25; -	Key_SetCatcher( Key_GetCatcher( ) ^ KEYCATCH_MESSAGE ); -} - -/* -================ -Con_MessageMode3_f -================ -*/ -void Con_MessageMode3_f (void) { -	chat_playerNum = VM_Call( cgvm, CG_CROSSHAIR_PLAYER ); -	if ( chat_playerNum < 0 || chat_playerNum >= MAX_CLIENTS ) { -		chat_playerNum = -1; -		return; -	} -	chat_team = qfalse; -	Field_Clear( &chatField ); -	chatField.widthInChars = 30; -	Key_SetCatcher( Key_GetCatcher( ) ^ KEYCATCH_MESSAGE ); -} - -/* -================ -Con_MessageMode4_f -================ -*/ -void Con_MessageMode4_f (void) { -	chat_playerNum = VM_Call( cgvm, CG_LAST_ATTACKER ); -	if ( chat_playerNum < 0 || chat_playerNum >= MAX_CLIENTS ) { -		chat_playerNum = -1; -		return; -	} -	chat_team = qfalse; -	Field_Clear( &chatField ); -	chatField.widthInChars = 30; -	Key_SetCatcher( Key_GetCatcher( ) ^ KEYCATCH_MESSAGE ); -} - -/* -================  Con_Clear_f  ================  */ @@ -314,10 +253,6 @@ void Con_Init (void) {  	CL_LoadConsoleHistory( );  	Cmd_AddCommand ("toggleconsole", Con_ToggleConsole_f); -	Cmd_AddCommand ("messagemode", Con_MessageMode_f); -	Cmd_AddCommand ("messagemode2", Con_MessageMode2_f); -	Cmd_AddCommand ("messagemode3", Con_MessageMode3_f); -	Cmd_AddCommand ("messagemode4", Con_MessageMode4_f);  	Cmd_AddCommand ("clear", Con_Clear_f);  	Cmd_AddCommand ("condump", Con_Dump_f);  } @@ -606,26 +541,6 @@ void Con_DrawConsole( void ) {  	if( Key_GetCatcher( ) & ( KEYCATCH_UI | KEYCATCH_CGAME ) )  		return; - -	// draw the chat line -	if( Key_GetCatcher( ) & KEYCATCH_MESSAGE ) -	{ -		int skip; - -		if( chat_team ) -		{ -			SCR_DrawBigString( 8, 232, "Team Say:", 1.0f, qfalse ); -			skip = 11; -		} -		else -		{  -			SCR_DrawBigString( 8, 232, "Say:", 1.0f, qfalse ); -			skip = 5; -		} - -		Field_BigDraw( &chatField, skip * BIGCHAR_WIDTH, 232, -				SCREEN_WIDTH - ( skip + 1 ) * BIGCHAR_WIDTH, qtrue, qtrue ); -	}  }  //================================================================ diff --git a/src/client/cl_keys.c b/src/client/cl_keys.c index b23247bd..66597427 100644 --- a/src/client/cl_keys.c +++ b/src/client/cl_keys.c @@ -35,10 +35,6 @@ int			historyLine;	// the line being displayed from history buffer  							// will be <= nextHistoryLine  field_t		g_consoleField; -field_t		chatField; -qboolean	chat_team; - -int			chat_playerNum;  qboolean	key_overstrikeMode; @@ -705,51 +701,6 @@ void Console_Key (int key) {  	Field_KeyDownEvent( &g_consoleField, key );  } -//============================================================================ - - -/* -================ -Message_Key - -In game talk message -================ -*/ -void Message_Key( int key ) { - -	char	buffer[MAX_STRING_CHARS]; - - -	if (key == K_ESCAPE) { -		Key_SetCatcher( Key_GetCatcher( ) & ~KEYCATCH_MESSAGE ); -		Field_Clear( &chatField ); -		return; -	} - -	if ( key == K_ENTER || key == K_KP_ENTER ) -	{ -		if ( chatField.buffer[0] && cls.state == CA_ACTIVE ) { -			if (chat_playerNum != -1 ) - -				Com_sprintf( buffer, sizeof( buffer ), "tell %i \"%s\"\n", chat_playerNum, chatField.buffer ); - -			else if (chat_team) - -				Com_sprintf( buffer, sizeof( buffer ), "say_team \"%s\"\n", chatField.buffer ); -			else -				Com_sprintf( buffer, sizeof( buffer ), "say \"%s\"\n", chatField.buffer ); - - - -			CL_AddReliableCommand( buffer ); -		} -		Key_SetCatcher( Key_GetCatcher( ) & ~KEYCATCH_MESSAGE ); -		Field_Clear( &chatField ); -		return; -	} - -	Field_KeyDownEvent( &chatField, key ); -}  //============================================================================ @@ -1186,12 +1137,6 @@ void CL_KeyEvent (int key, qboolean down, unsigned time) {  	// escape is always handled special  	if ( key == K_ESCAPE && down ) { -		if ( Key_GetCatcher( ) & KEYCATCH_MESSAGE ) { -			// clear message mode -			Message_Key( key ); -			return; -		} -  		// escape always gets out of CGAME stuff  		if (Key_GetCatcher( ) & KEYCATCH_CGAME) {  			Key_SetCatcher( Key_GetCatcher( ) & ~KEYCATCH_CGAME ); @@ -1249,8 +1194,6 @@ void CL_KeyEvent (int key, qboolean down, unsigned time) {  		if ( cgvm ) {  			VM_Call( cgvm, CG_KEY_EVENT, key, down );  		}  -	} else if ( Key_GetCatcher( ) & KEYCATCH_MESSAGE ) { -		Message_Key( key );  	} else if ( cls.state == CA_DISCONNECTED ) {  		Console_Key( key );  	} else { @@ -1325,10 +1268,6 @@ void CL_CharEvent( int key ) {  	{  		VM_Call( uivm, UI_KEY_EVENT, key | K_CHAR_FLAG, qtrue );  	} -	else if ( Key_GetCatcher( ) & KEYCATCH_MESSAGE )  -	{ -		Field_CharEvent( &chatField, key ); -	}  	else if ( cls.state == CA_DISCONNECTED )  	{  		Field_CharEvent( &g_consoleField, key ); diff --git a/src/client/cl_scrn.c b/src/client/cl_scrn.c index 25217072..f0a64bb4 100644 --- a/src/client/cl_scrn.c +++ b/src/client/cl_scrn.c @@ -453,12 +453,6 @@ void SCR_DrawScreenField( stereoFrame_t stereoFrame ) {  		case CA_PRIMED:  			// draw the game information screen and loading progress  			CL_CGameRendering( stereoFrame ); - -			// also draw the connection information, so it doesn't -			// flash away too briefly on local or lan games -			// refresh to update the time -			VM_Call( uivm, UI_REFRESH, cls.realtime ); -			VM_Call( uivm, UI_DRAW_CONNECT_SCREEN, qtrue );  			break;  		case CA_ACTIVE:  			CL_CGameRendering( stereoFrame );  | 
