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

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Mar 4 16:38:32 EST 2009


Author: div0
Date: 2009-03-04 16:38:32 -0500 (Wed, 04 Mar 2009)
New Revision: 6046

Added:
   branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_names.c
Modified:
   branches/nexuiz-2.0/.patchsets
   branches/nexuiz-2.0/data/qcsrc/menu/item/label.c
   branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup.c
   branches/nexuiz-2.0/data/scripts/entities.def
   branches/nexuiz-2.0/data/scripts/evil4_techtrims.shader
Log:
r6040 | esteel | 2009-03-03 18:39:59 +0100 (Tue, 03 Mar 2009) | 1 line
use part of terencehills patch and moved the skin colors to the right in the playersetup dialog.  seems to fit the overall structure better
r6041 | esteel | 2009-03-03 19:23:03 +0100 (Tue, 03 Mar 2009) | 1 line
second part of terencehills patch, colored name preview
r6043 | div0 | 2009-03-03 20:09:41 +0100 (Tue, 03 Mar 2009) | 2 lines
remove a weird empty window
r6044 | div0 | 2009-03-04 11:56:52 +0100 (Wed, 04 Mar 2009) | 2 lines
remove some non-ascii characters from the shader
r6045 | m0rfar | 2009-03-04 17:52:37 +0100 (Wed, 04 Mar 2009) | 1 line
Don't show DOM models in radiant. They are aligned very wrong.


Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets	2009-03-04 16:52:37 UTC (rev 6045)
+++ branches/nexuiz-2.0/.patchsets	2009-03-04 21:38:32 UTC (rev 6046)
@@ -1,2 +1,2 @@
 master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-6035,6037-6039
+revisions_applied = 1-6045

Modified: branches/nexuiz-2.0/data/qcsrc/menu/item/label.c
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/item/label.c	2009-03-04 16:52:37 UTC (rev 6045)
+++ branches/nexuiz-2.0/data/qcsrc/menu/item/label.c	2009-03-04 21:38:32 UTC (rev 6046)
@@ -9,6 +9,7 @@
 	ATTRIB(Label, fontSize, float, 8)
 	ATTRIB(Label, align, float, 0.5)
 	ATTRIB(Label, allowCut, float, 0)
+	ATTRIB(Label, allowColors, float, 0)
 	ATTRIB(Label, keepspaceLeft, float, 0) // for use by subclasses (radiobuttons for example)
 	ATTRIB(Label, keepspaceRight, float, 0)
 	ATTRIB(Label, marginLeft, float, 0) // alternate way to specify keepspace* (in characters from the font)
@@ -32,7 +33,7 @@
 void setTextLabel(entity me, string txt)
 {
 	me.text = txt;
-	me.realOrigin_x = me.align * (1 - me.keepspaceLeft - me.keepspaceRight - min(me.realFontSize_x * draw_TextWidth(me.text, 0), (1 - me.keepspaceLeft - me.keepspaceRight))) + me.keepspaceLeft;
+	me.realOrigin_x = me.align * (1 - me.keepspaceLeft - me.keepspaceRight - min(me.realFontSize_x * draw_TextWidth(me.text, me.allowColors), (1 - me.keepspaceLeft - me.keepspaceRight))) + me.keepspaceLeft;
 }
 void resizeNotifyLabel(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
 {
@@ -43,7 +44,7 @@
 		me.keepspaceLeft = me.marginLeft * me.realFontSize_x;
 	if(me.marginRight)
 		me.keepspaceRight = me.marginRight * me.realFontSize_x;
-	me.realOrigin_x = me.align * (1 - me.keepspaceLeft - me.keepspaceRight - min(me.realFontSize_x * draw_TextWidth(me.text, 0), (1 - me.keepspaceLeft - me.keepspaceRight))) + me.keepspaceLeft;
+	me.realOrigin_x = me.align * (1 - me.keepspaceLeft - me.keepspaceRight - min(me.realFontSize_x * draw_TextWidth(me.text, me.allowColors), (1 - me.keepspaceLeft - me.keepspaceRight))) + me.keepspaceLeft;
 	me.realOrigin_y = 0.5 * (1 - me.realFontSize_y);
 }
 void configureLabelLabel(entity me, string txt, float sz, float algn)
@@ -71,20 +72,23 @@
 		if(t)
 		{
 			if(me.allowCut) // FIXME allowCut incompatible with align != 0
-				draw_Text(me.realOrigin, draw_TextShortenToWidth(t, (1 - me.keepspaceLeft - me.keepspaceRight) / me.realFontSize_x, 0), me.realFontSize, me.colorL, me.alpha, 0);
+				draw_Text(me.realOrigin, draw_TextShortenToWidth(t, (1 - me.keepspaceLeft - me.keepspaceRight) / me.realFontSize_x, me.allowColors), me.realFontSize, me.colorL, me.alpha, me.allowColors);
 			else if(me.allowWrap) // FIXME allowWrap incompatible with align != 0
 			{
 				getWrappedLine_remaining = t;
 				o = me.realOrigin;
 				while(getWrappedLine_remaining)
 				{
-					t = getWrappedLine((1 - me.keepspaceLeft - me.keepspaceRight) / me.realFontSize_x, draw_TextWidth_WithoutColors);
-					draw_Text(o, t, me.realFontSize, me.colorL, me.alpha, 0);
+					if (me.allowColors)
+						t = getWrappedLine((1 - me.keepspaceLeft - me.keepspaceRight) / me.realFontSize_x, draw_TextWidth_WithColors);
+					else
+						t = getWrappedLine((1 - me.keepspaceLeft - me.keepspaceRight) / me.realFontSize_x, draw_TextWidth_WithoutColors);
+					draw_Text(o, t, me.realFontSize, me.colorL, me.alpha, me.allowColors);
 					o_y += me.realFontSize_y;
 				}
 			}
 			else
-				draw_Text(me.realOrigin, t, me.realFontSize, me.colorL, me.alpha, 0);
+				draw_Text(me.realOrigin, t, me.realFontSize, me.colorL, me.alpha, me.allowColors);
 		}
 }
 #endif

Modified: branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup.c
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup.c	2009-03-04 16:52:37 UTC (rev 6045)
+++ branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup.c	2009-03-04 21:38:32 UTC (rev 6046)
@@ -28,15 +28,28 @@
 		me.playerNameLabel.alpha = me.playerNameLabelAlpha;
 	drawContainer(me);
 }
+string getPlayerName(entity me)
+{
+	return cvar_string("_cl_name");
+}
 void fillNexuizPlayerSettingsTab(entity me)
 {
-	entity e, pms, sl, e0, box;
+	entity e, pms, sl, eName, e0, box;
 	float i, n;
 
+	eName = spawn();
+	eName.toString = getPlayerName;
+
 	me.TR(me);
-		me.TD(me, 1, 1, me.playerNameLabel = makeNexuizTextLabel(0, "Player Name:"));
+		me.TD(me, 1, 0.5, me.playerNameLabel = makeNexuizTextLabel(0, "Name:"));
 			me.playerNameLabelAlpha = me.playerNameLabel.alpha;
-		me.TD(me, 1, 2, box = makeNexuizInputBox(1, "_cl_name"));
+		me.TD(me, 1, 2.5, e = makeNexuizTextLabel(0, string_null));
+			e.textEntity = eName;
+			e.allowCut = 1;
+			e.allowColors = 1;
+			e.alpha = 1;
+	me.TR(me);
+		me.TD(me, 1, 3.0, box = makeNexuizInputBox(1, "_cl_name"));
 			box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved
 			box.maxLength = 63;
 	me.TR(me);
@@ -47,23 +60,32 @@
 	me.TR(me);
 	me.TR(me);
 	me.TR(me);
-		me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "First Color:"));
-		n = 16 - !cvar("developer");
-		for(i = 0; i < n; ++i)
-			me.TDNoMargin(me, 1, 2 / n, e = makeNexuizColorButton(1, 0, i), '1 0 0');
-	me.TR(me);
-		me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Second Color:"));
-		for(i = 0; i < n; ++i)
-			me.TDNoMargin(me, 1, 2 / n, e = makeNexuizColorButton(2, 1, i), '1 0 0');
-	me.TR(me);
 		pms = makeNexuizPlayerModelSelector();
+		me.TDempty(me, 0.5);
 		me.TD(me, 1, 0.3, e = makeNexuizButton("<<", '0 0 0'));
 			e.onClick = PlayerModelSelector_Prev_Click;
 			e.onClickEntity = pms;
-		me.TD(me, me.rows - me.currentRow - 1, 2.4, pms);
+		me.TD(me, me.rows - me.currentRow - 1, 1.9, pms);
 		me.TD(me, 1, 0.3, e = makeNexuizButton(">>", '0 0 0'));
 			e.onClick = PlayerModelSelector_Next_Click;
 			e.onClickEntity = pms;
+	me.gotoRC(me, 8, 0.1);
+		me.TD(me, 1, 0.6, e = makeNexuizTextLabel(1, "Skin colors"));
+	me.gotoRC(me, 9, 0.2); me.setFirstColumn(me, me.currentColumn);
+		n = 16 - !cvar("developer");
+		for(i = 0; i < n; ++i)
+		{
+			me.gotoRC(me, 8 + i * 0.75, 0.1);
+			me.TR(me);
+				me.TDNoMargin(me, 1, (2 / n) + 0.1, e = makeNexuizColorButton(1, 0, i), '1 0 0');
+		}
+	me.gotoRC(me, 9, 0.45); me.setFirstColumn(me, me.currentColumn);
+		for(i = 0; i < n; ++i)
+		{
+			me.gotoRC(me, 8 + i * 0.75, 0.4);
+			me.TR(me);
+				me.TDNoMargin(me, 1, (2 / n) + 0.1, e = makeNexuizColorButton(2, 1, i), '1 0 0');
+		}
 
 	me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
 		me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Field of View:"));

Copied: branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_names.c (from rev 6041, trunk/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_names.c)
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_names.c	                        (rev 0)
+++ branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_names.c	2009-03-04 21:38:32 UTC (rev 6046)
@@ -0,0 +1,18 @@
+#ifdef INTERFACE
+CLASS(NexuizNamesDialog) EXTENDS(NexuizDialog)
+	METHOD(NexuizNamesDialog, toString, string(entity))
+	ATTRIB(NexuizNamesDialog, title, string, "Favorite Names")
+	ATTRIB(NexuizNamesDialog, color, vector, SKINCOLOR_DIALOG_MUTATORS) // FIXME: replace SKINCOLOR_DIALOG_MUTATORS with something else
+	ATTRIB(NexuizNamesDialog, intendedWidth, float, 0.45)
+	ATTRIB(NexuizNamesDialog, rows, float, 5)
+	ATTRIB(NexuizNamesDialog, columns, float, 6)
+	ATTRIB(NexuizNamesDialog, refilterEntity, entity, NULL)
+ENDCLASS(NexuizNamesDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+string toStringNexuizNamesDialog(entity me)
+{
+	return cvar_string("_cl_name");
+}
+#endif

Modified: branches/nexuiz-2.0/data/scripts/entities.def
===================================================================
--- branches/nexuiz-2.0/data/scripts/entities.def	2009-03-04 16:52:37 UTC (rev 6045)
+++ branches/nexuiz-2.0/data/scripts/entities.def	2009-03-04 21:38:32 UTC (rev 6046)
@@ -15,7 +15,7 @@
 wait: How often this point gives its controlling team frags.
 frags: How many frags this point gives each wait cycle.
 -------- MODEL FOR RADIANT ONLY - DO NOT SET THIS AS A KEY --------
-model="models/domination/dom_unclaimed.md3"
+zbqry="zbqryf/qbzvangvba/qbz_hapynvzrq.zq3"
 
 */
 

Modified: branches/nexuiz-2.0/data/scripts/evil4_techtrims.shader
===================================================================
--- branches/nexuiz-2.0/data/scripts/evil4_techtrims.shader	2009-03-04 16:52:37 UTC (rev 6045)
+++ branches/nexuiz-2.0/data/scripts/evil4_techtrims.shader	2009-03-04 21:38:32 UTC (rev 6046)
@@ -562,8 +562,8 @@
 //********************************************
 //********************************************
 // techwall section II
-// This is the ÒdirtyÓ version of the evil_techwalls...
-// I added Òd_Ó to the filenames.
+// This is the dirty version of the evil_techwalls...
+// I added d_ to the filenames.
 //********************************************
 //********************************************
 //********************************************




More information about the nexuiz-commits mailing list