Widget refactoring to support listboxes

This commit is contained in:
Paul Chote
2010-07-12 17:41:25 +12:00
parent d740cf9fcd
commit f70ac60135
12 changed files with 25 additions and 38 deletions

View File

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