|
|
@ -175,10 +175,10 @@ static void Con_SetColor( void ) |
|
|
|
switch( num ) |
|
|
|
switch( num ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case 1: |
|
|
|
case 1: |
|
|
|
Con_DefaultColor( r, r, r ); |
|
|
|
Con_DefaultColor( r, r, r, false ); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 3: |
|
|
|
case 3: |
|
|
|
Con_DefaultColor( r, g, b ); |
|
|
|
Con_DefaultColor( r, g, b, false ); |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
Cvar_DirectSet( &con_color, con_color.def_string ); |
|
|
|
Cvar_DirectSet( &con_color, con_color.def_string ); |
|
|
@ -2310,11 +2310,20 @@ Con_DefaultColor |
|
|
|
called from MainUI |
|
|
|
called from MainUI |
|
|
|
========= |
|
|
|
========= |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
void GAME_EXPORT Con_DefaultColor( int r, int g, int b ) |
|
|
|
void Con_DefaultColor( int r, int g, int b, qboolean gameui ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
r = bound( 0, r, 255 ); |
|
|
|
r = bound( 0, r, 255 ); |
|
|
|
g = bound( 0, g, 255 ); |
|
|
|
g = bound( 0, g, 255 ); |
|
|
|
b = bound( 0, b, 255 ); |
|
|
|
b = bound( 0, b, 255 ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// gameui wants to override console color... check if it's not default
|
|
|
|
|
|
|
|
if( gameui && ( g_color_table[7][0] != r || g_color_table[7][1] != g || g_color_table[7][2] != b )) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// yes, different from default orange, disable con_color
|
|
|
|
|
|
|
|
SetBits( con_color.flags, FCVAR_READ_ONLY ); |
|
|
|
|
|
|
|
ClearBits( con_color.flags, FCVAR_CHANGED ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
MakeRGBA( g_color_table[7], r, g, b, 255 ); |
|
|
|
MakeRGBA( g_color_table[7], r, g, b, 255 ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|