r6076 - in branches/nexuiz-2.0: . data/qcsrc/menu/item data/qcsrc/menu/nexuiz
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Mar 7 12:16:11 EST 2009
Author: div0
Date: 2009-03-07 12:16:09 -0500 (Sat, 07 Mar 2009)
New Revision: 6076
Modified:
branches/nexuiz-2.0/.patchsets
branches/nexuiz-2.0/branch-manager
branches/nexuiz-2.0/data/qcsrc/menu/item/label.c
branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup.c
Log:
undo the following merge (this feature is buggy and not ready for release yet):
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
Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets 2009-03-07 16:52:05 UTC (rev 6075)
+++ branches/nexuiz-2.0/.patchsets 2009-03-07 17:16:09 UTC (rev 6076)
@@ -1,2 +1,2 @@
master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-6074
+revisions_applied = 1-6039,6044-6074
Modified: branches/nexuiz-2.0/branch-manager
===================================================================
--- branches/nexuiz-2.0/branch-manager 2009-03-07 16:52:05 UTC (rev 6075)
+++ branches/nexuiz-2.0/branch-manager 2009-03-07 17:16:09 UTC (rev 6076)
@@ -299,7 +299,7 @@
open my $fh, '>>', '.commitmsg'
or die "open .commitmsg";
- print $fh "undo the following merge:\n", GetLog $first, last;
+ print $fh "undo the following merge:\n", GetLog $first, $last;
close $fh;
WriteSettings();
Modified: branches/nexuiz-2.0/data/qcsrc/menu/item/label.c
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/item/label.c 2009-03-07 16:52:05 UTC (rev 6075)
+++ branches/nexuiz-2.0/data/qcsrc/menu/item/label.c 2009-03-07 17:16:09 UTC (rev 6076)
@@ -9,7 +9,6 @@
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)
@@ -33,7 +32,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, me.allowColors), (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, 0), (1 - me.keepspaceLeft - me.keepspaceRight))) + me.keepspaceLeft;
}
void resizeNotifyLabel(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
{
@@ -44,7 +43,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, me.allowColors), (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, 0), (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)
@@ -72,23 +71,20 @@
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, me.allowColors), me.realFontSize, me.colorL, me.alpha, me.allowColors);
+ draw_Text(me.realOrigin, draw_TextShortenToWidth(t, (1 - me.keepspaceLeft - me.keepspaceRight) / me.realFontSize_x, 0), me.realFontSize, me.colorL, me.alpha, 0);
else if(me.allowWrap) // FIXME allowWrap incompatible with align != 0
{
getWrappedLine_remaining = t;
o = me.realOrigin;
while(getWrappedLine_remaining)
{
- 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);
+ t = getWrappedLine((1 - me.keepspaceLeft - me.keepspaceRight) / me.realFontSize_x, draw_TextWidth_WithoutColors);
+ draw_Text(o, t, me.realFontSize, me.colorL, me.alpha, 0);
o_y += me.realFontSize_y;
}
}
else
- draw_Text(me.realOrigin, t, me.realFontSize, me.colorL, me.alpha, me.allowColors);
+ draw_Text(me.realOrigin, t, me.realFontSize, me.colorL, me.alpha, 0);
}
}
#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-07 16:52:05 UTC (rev 6075)
+++ branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup.c 2009-03-07 17:16:09 UTC (rev 6076)
@@ -28,28 +28,15 @@
me.playerNameLabel.alpha = me.playerNameLabelAlpha;
drawContainer(me);
}
-string getPlayerName(entity me)
-{
- return cvar_string("_cl_name");
-}
void fillNexuizPlayerSettingsTab(entity me)
{
- entity e, pms, sl, eName, e0, box;
+ entity e, pms, sl, e0, box;
float i, n;
- eName = spawn();
- eName.toString = getPlayerName;
-
me.TR(me);
- me.TD(me, 1, 0.5, me.playerNameLabel = makeNexuizTextLabel(0, "Name:"));
+ me.TD(me, 1, 1, me.playerNameLabel = makeNexuizTextLabel(0, "Player Name:"));
me.playerNameLabelAlpha = me.playerNameLabel.alpha;
- 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"));
+ me.TD(me, 1, 2, box = makeNexuizInputBox(1, "_cl_name"));
box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved
box.maxLength = 63;
me.TR(me);
@@ -60,32 +47,23 @@
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, 1.9, pms);
+ me.TD(me, me.rows - me.currentRow - 1, 2.4, 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:"));
More information about the nexuiz-commits
mailing list