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,8 +60,8 @@ 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);