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

View File

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

View File

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