r5317 - in branches/nexuiz-2.0: . data/qcsrc/menu/item

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Dec 26 10:56:58 EST 2008


Author: div0
Date: 2008-12-26 10:56:57 -0500 (Fri, 26 Dec 2008)
New Revision: 5317

Modified:
   branches/nexuiz-2.0/.patchsets
   branches/nexuiz-2.0/data/qcsrc/menu/item/inputbox.c
Log:
r5315 | div0 | 2008-12-26 16:47:30 +0100 (Fri, 26 Dec 2008) | 2 lines
let's try without text brightness again
r5316 | div0 | 2008-12-26 16:53:43 +0100 (Fri, 26 Dec 2008) | 2 lines
bring back B & C, but do them correctly

Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets	2008-12-26 15:53:43 UTC (rev 5316)
+++ branches/nexuiz-2.0/.patchsets	2008-12-26 15:56:57 UTC (rev 5317)
@@ -1,2 +1,2 @@
 master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-5313
+revisions_applied = 1-5316

Modified: branches/nexuiz-2.0/data/qcsrc/menu/item/inputbox.c
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/item/inputbox.c	2008-12-26 15:53:43 UTC (rev 5316)
+++ branches/nexuiz-2.0/data/qcsrc/menu/item/inputbox.c	2008-12-26 15:56:57 UTC (rev 5317)
@@ -165,15 +165,17 @@
 		vector theColor;
 		float theAlpha;    //float theVariableAlpha;
 		vector p;
-		float brightness;
+		float brightness, contrast;
 		vector theTempColor;
 		float component;
 		
 		brightness = cvar("r_textbrightness");
+		contrast = cvar("r_textcontrast");
 		p = me.realOrigin - eX * me.scrollPos;
 		theColor = '1 1 1';
 		theAlpha = 1;    //theVariableAlpha = 1; // changes when ^ax found
 		
+		theColor = theColor * contrast + '1 1 1' * brightness;
 		for(i = 0; i < strlen(me.text); ++i)
 		{
 			ch = substring(me.text, i, 1);
@@ -202,13 +204,13 @@
 						case 8: theColor = '1 1 1'; theAlpha = 0.5; break;
 						case 9: theColor = '0.5 0.5 0.5'; theAlpha = 1; break;
 					}
-					theColor = theColor * (1 - brightness) + brightness * '1 1 1';
+					theColor = theColor * contrast + '1 1 1' * brightness;
 					draw_Fill(p, eX * w + eY * me.realFontSize_y, '1 1 1', 0.5);
 					draw_Text(p, strcat(ch, ch2), me.realFontSize, theColor, theAlpha, 0);
 				}
 				else if(ch2 == "x") // ^x found
 				{
-					theColor = '1 1 1' * (1 - brightness) + brightness * '1 1 1';
+					theColor = '1 1 1';
 					theTempColor = '0 0 0';
 					
 					component = HEXDIGIT_TO_DEC(substring(me.text, i+2, 1));
@@ -225,7 +227,7 @@
 							if (component >= 0) // ^xrgb found
 							{
 								theTempColor_z = component/15;
-								theColor = '0 0 0' + theTempColor;
+								theColor = theTempColor * contrast + '1 1 1' * brightness;
 								w = draw_TextWidth(substring(me.text, i, 5), 0) * me.realFontSize_x;
 								
 								draw_Fill(p, eX * w + eY * me.realFontSize_y, '1 1 1', 0.5);




More information about the nexuiz-commits mailing list