1.3 KiB
1.3 KiB
ElementManager
This class manages elements and plugins. It loads elements and plugins from the elements and plugins directories and then applies the plugins to the elements. It also provides a way to get elements and APIs.
Functions
| Method | Returns | Description |
|---|---|---|
| ElementManager.getAPI | table | |
| ElementManager.getElement | table | |
| ElementManager.getElementList | table | |
| ElementManager.loadElement | - |
ElementManager.getAPI(name)
Gets an Plugin API by name
Parameters
namestringThe name of the API to get
Returns
tableAPIThe API
ElementManager.getElement(name)
Gets an element by name. If the element is not loaded, it will try to load it first.
Parameters
namestringThe name of the element to get
Returns
tableElementThe element class
ElementManager.getElementList()
Gets a list of all elements
Returns
tableElementListA list of all elements
ElementManager.loadElement(name)
Loads an element by name. This will load the element and apply any plugins to it.
Parameters
namestringThe name of the element to load
Usage
ElementManager.loadElement("Button")