Vertically align labels
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user