This commit is contained in:
Chris Forbes
2010-04-24 17:43:44 +12:00
committed by alzeih
parent 471a5c29c8
commit 70ebec36eb
3 changed files with 6 additions and 3 deletions

View File

@@ -89,7 +89,8 @@ namespace OpenRA.Widgets
var pos = DrawPosition();
var stateOffset = (Depressed) ? new int2(VisualHeight, VisualHeight) : new int2(0, 0);
WidgetUtils.DrawPanel(Depressed ? "dialog3" : "dialog2", new Rectangle(pos.X, pos.Y, Bounds.Width, Bounds.Height ) );
WidgetUtils.DrawPanel(Depressed ? "dialog3" : "dialog2",
new Rectangle(pos.X, pos.Y, Bounds.Width, Bounds.Height ) );
var text = GetText();
Game.chrome.renderer.BoldFont.DrawText(text,

View File

@@ -49,7 +49,7 @@ namespace OpenRA.Widgets.Delegates
template.Id = "PLAYER_{0}".F(c.Index);
template.Parent = Players;
template.GetWidget<ButtonWidget>("NAME").GetText = () => {return c.Name; };
template.Bounds = new Rectangle(pos.X, pos.Y + i, template.Bounds.Width, template.Bounds.Height);
template.Bounds = new Rectangle(0, i, template.Bounds.Width, template.Bounds.Height);
template.IsVisible = () => {return true;};
Players.AddChild(template);
i += 30;

View File

@@ -91,7 +91,9 @@ namespace OpenRA.Widgets
public virtual void Initialize()
{
// Parse the YAML equations to find the widget bounds
Rectangle parentBounds = (Parent == null) ? new Rectangle(0,0,Game.viewport.Width,Game.viewport.Height) : Parent.Bounds;
Rectangle parentBounds = (Parent == null)
? new Rectangle(0,0,Game.viewport.Width,Game.viewport.Height)
: Parent.Bounds;
Dictionary<string, int> substitutions = new Dictionary<string, int>();
substitutions.Add("WINDOW_RIGHT", Game.viewport.Width);