diff --git a/OpenRA.Game/Widgets/ButtonWidget.cs b/OpenRA.Game/Widgets/ButtonWidget.cs index f29da05754..50afd45ab9 100644 --- a/OpenRA.Game/Widgets/ButtonWidget.cs +++ b/OpenRA.Game/Widgets/ButtonWidget.cs @@ -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, diff --git a/OpenRA.Game/Widgets/Delegates/LobbyDelegate.cs b/OpenRA.Game/Widgets/Delegates/LobbyDelegate.cs index cb7649b301..28091fe816 100644 --- a/OpenRA.Game/Widgets/Delegates/LobbyDelegate.cs +++ b/OpenRA.Game/Widgets/Delegates/LobbyDelegate.cs @@ -49,7 +49,7 @@ namespace OpenRA.Widgets.Delegates template.Id = "PLAYER_{0}".F(c.Index); template.Parent = Players; template.GetWidget("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; diff --git a/OpenRA.Game/Widgets/Widget.cs b/OpenRA.Game/Widgets/Widget.cs index fbfc60199f..52493cbc60 100644 --- a/OpenRA.Game/Widgets/Widget.cs +++ b/OpenRA.Game/Widgets/Widget.cs @@ -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 substitutions = new Dictionary(); substitutions.Add("WINDOW_RIGHT", Game.viewport.Width);