1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-26 14:38:34 +01:00

allow changing an element's controls

This commit is contained in:
Ellpeck 2020-03-17 20:02:23 +01:00
parent b175df7397
commit 06ca5a8c04

View file

@ -30,11 +30,12 @@ namespace MLEM.Ui.Elements {
get => this.system; get => this.system;
internal set { internal set {
this.system = value; this.system = value;
this.Controls = value?.Controls;
if (this.system != null) if (this.system != null)
this.InitStyle(this.system.Style); this.InitStyle(this.system.Style);
} }
} }
protected UiControls Controls => this.System.Controls; protected UiControls Controls;
protected InputHandler Input => this.Controls.Input; protected InputHandler Input => this.Controls.Input;
public Element Parent { get; private set; } public Element Parent { get; private set; }
public RootElement Root { get; internal set; } public RootElement Root { get; internal set; }