diff --git a/OpenRA.Game/Chrome/Widget.cs b/OpenRA.Game/Chrome/Widget.cs index 9a888241e8..7448615503 100644 --- a/OpenRA.Game/Chrome/Widget.cs +++ b/OpenRA.Game/Chrome/Widget.cs @@ -24,7 +24,9 @@ namespace OpenRA.Widgets // Calculated internally public Rectangle Bounds; public Rectangle EventBounds; - public Widget Parent = null; + public Widget Parent = null; + + public Widget() { InputHandler = Lazy.New(() => BindHandler(Delegate)); } public virtual void Initialize() { @@ -54,8 +56,6 @@ namespace OpenRA.Widgets child.Initialize(); EventBounds = Rectangle.Union(EventBounds, child.EventBounds); } - - InputHandler = Lazy.New(() => BindHandler(Delegate)); } static IWidgetDelegate BindHandler(string name)