Skip to main content

IEnabled

Description

The IEnabled interface aims to provide a unifyed function Enabled(bool) which must be implemented by inhertors.

This allows for a simpler syntax across components, as well as allowing bulk requests when using GetComponents[...]<T>() calls.

Examples

Simple UI Example
TextComponent myText = UI.Text("Foo");
ButtonComponent myButton = UI.Button("Click", () => { /* ... */ });

myText.Enabled(false); // invokes the text-specific implementation
myButton.Enabled(false); // invokes the button-specific implementation

References

This interface is implemented by: GraphicComponent, AbstractViewComponent, LayoutComponent, ScrollViewComponent, SpacerComponent.

Implementation