diff --git a/MLEM.Ui/Elements/Element.cs b/MLEM.Ui/Elements/Element.cs index af3995e..324056f 100644 --- a/MLEM.Ui/Elements/Element.cs +++ b/MLEM.Ui/Elements/Element.cs @@ -30,11 +30,12 @@ namespace MLEM.Ui.Elements { get => this.system; internal set { this.system = value; + this.Controls = value?.Controls; if (this.system != null) this.InitStyle(this.system.Style); } } - protected UiControls Controls => this.System.Controls; + protected UiControls Controls; protected InputHandler Input => this.Controls.Input; public Element Parent { get; private set; } public RootElement Root { get; internal set; }