more stuff working

This commit is contained in:
alzeih
2010-04-24 16:41:11 +12:00
parent 9c916be94d
commit 3d1d6f5e00
9 changed files with 47 additions and 35 deletions

View File

@@ -88,10 +88,11 @@ namespace OpenRA.Widgets
}
var stateOffset = (Depressed) ? new int2(VisualHeight, VisualHeight) : new int2(0, 0);
WidgetUtils.DrawPanel(Depressed ? "dialog3" : "dialog2", Bounds);
WidgetUtils.DrawPanel(Depressed ? "dialog3" : "dialog2", new Rectangle(Bounds.X + getParentOffset().X, Bounds.Y + getParentOffset().Y, Bounds.Width, Bounds.Height ) );
var text = GetText();
Game.chrome.renderer.BoldFont.DrawText(text,
new int2(Bounds.X + Bounds.Width / 2, Bounds.Y + Bounds.Height / 2)
new int2( ( Bounds.X + getParentOffset().X) + Bounds.Width / 2, ( Bounds.Y + getParentOffset().Y) + Bounds.Height / 2)
- new int2(Game.chrome.renderer.BoldFont.Measure(text).X / 2,
Game.chrome.renderer.BoldFont.Measure(text).Y / 2) + stateOffset, Color.White);