summaryrefslogtreecommitdiff
path: root/source/ui_script.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2009-09-16 10:33:00 +0000
committerAndrey Nazarov <skuller@skuller.net>2009-09-16 10:33:00 +0000
commitf963e1292cb6710891979d7296dbe06d87f19988 (patch)
tree7cc776c5f45475cc37e9dcfbab6b4c838a0e886a /source/ui_script.c
parentd11d5532fcc083c1355467733214765cdb4dc5c3 (diff)
Made ‘_echo’ command accept color names as well.
Renamed COM_ParseColor into SCR_ParseColor. Added Com_ParseColor, moved colorNames table into common.c
Diffstat (limited to 'source/ui_script.c')
-rw-r--r--source/ui_script.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/ui_script.c b/source/ui_script.c
index 13ef163..091a0f2 100644
--- a/source/ui_script.c
+++ b/source/ui_script.c
@@ -258,7 +258,7 @@ static void Parse_Blank( menuFrameWork_t *menu ) {
static void Parse_Background( menuFrameWork_t *menu ) {
char *s = Cmd_Argv( 1 );
- if( COM_ParseColor( s, menu->color ) ) {
+ if( SCR_ParseColor( s, menu->color ) ) {
menu->image = 0;
if( menu->color[3] != 255 ) {
menu->transparent = qtrue;
@@ -281,13 +281,13 @@ static void Parse_Color( void ) {
c = Cmd_Argv( 2 );
if( !strcmp( s, "normal" ) ) {
- COM_ParseColor( c, uis.color.normal );
+ SCR_ParseColor( c, uis.color.normal );
} else if( !strcmp( s, "active" ) ) {
- COM_ParseColor( c, uis.color.active );
+ SCR_ParseColor( c, uis.color.active );
} else if( !strcmp( s, "selection" ) ) {
- COM_ParseColor( c, uis.color.selection );
+ SCR_ParseColor( c, uis.color.selection );
} else if( !strcmp( s, "disabled" ) ) {
- COM_ParseColor( c, uis.color.disabled );
+ SCR_ParseColor( c, uis.color.disabled );
} else {
Com_Printf( "Unknown state '%s'\n", s );
}
@@ -391,7 +391,7 @@ static qboolean Parse_File( const char *path, int depth ) {
} else if( !strcmp( cmd, "background" ) ) {
char *s = Cmd_Argv( 1 );
- if( COM_ParseColor( s, uis.color.background ) ) {
+ if( SCR_ParseColor( s, uis.color.background ) ) {
uis.backgroundHandle = 0;
} else {
uis.backgroundHandle = R_RegisterPic( s );