Vertically align labels

This commit is contained in:
Paul Chote
2010-07-10 21:38:47 +12:00
parent e063f5e271
commit dcf13e52c2
3 changed files with 13 additions and 13 deletions

View File

@@ -45,7 +45,7 @@ namespace OpenRA.Network
var player = Game.world.players.Values.FirstOrDefault(p => p.Index == client.Index);
var isAlly = (world.GameHasStarted) ?
player != null && Game.world.LocalPlayer != null && player.Stances[Game.world.LocalPlayer] == Stance.Ally :
client.Team == Game.LocalClient.Team && client.Team != 0;
client == Game.LocalClient || (client.Team == Game.LocalClient.Team && client.Team != 0);
if (isAlly)
Chrome.chatWidget.AddLine(Game.world.PlayerColors()[client.PaletteIndex].Color, client.Name + " (Team)", order.TargetString);

View File

@@ -60,7 +60,7 @@ namespace OpenRA.Widgets
return;
int2 textSize = font.Measure(text);
int2 position = DrawPosition();
int2 position = DrawPosition() + new int2(0, (Bounds.Height - textSize.Y)/2);
if (Align == TextAlign.Center)
position += new int2((Bounds.Width - textSize.X)/2, 0);

View File

@@ -338,7 +338,7 @@ Container:
Width:95
Height:25
X:0
Y:5
Y:0
Button@COLOR:
Id:COLOR
Width:65
@@ -371,7 +371,7 @@ Container:
Width:60
Height:25
X:40
Y:5
Y:0
Button@TEAM:
Id:TEAM
Text:Team
@@ -381,7 +381,7 @@ Container:
Y:0
Checkbox@STATUS:
Id:STATUS
X:385
X:405
Y:1
Width:20
Height:20
@@ -399,7 +399,7 @@ Container:
Width:95
Height:25
X:0
Y:5
Y:0
ColorBlock@COLOR:
Id:COLOR
X:105
@@ -425,7 +425,7 @@ Container:
Width:60
Height:25
X:40
Y:5
Y:0
Label@TEAM:
Id:TEAM
Text:Team
@@ -436,13 +436,13 @@ Container:
Align:Center
Checkbox@STATUS:
Id:STATUS
X:385
X:405
Y:1
Width:20
Height:20
Container@LABEL_CONTAINER:
X:30
Y:50
Y:45
Children:
Label@LABEL_LOBBY_NAME:
Id:LABEL_LOBBY_NAME
@@ -479,8 +479,8 @@ Container:
Id:LABEL_LOBBY_STATUS
X:380
Y:0
Width:20
Height:20
Width:70
Height:25
Text:Ready
Align:Center
Button@CHANGEMAP_BUTTON:
@@ -505,7 +505,7 @@ Container:
Width:70
Height:25
X:0
Y:PARENT_BOTTOM - 75
Y:PARENT_BOTTOM - 76
Text:Chat:
Align:Right
TextField@CHAT_TEXTFIELD: