This commit is contained in:
NoryiE
2025-09-13 20:28:52 +00:00
parent 9e1112f3bd
commit 4ccefcac9f
48 changed files with 3036 additions and 1565 deletions

View File

@@ -1,27 +1,30 @@
# 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.
_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](#elementmanager-getapi)|table|
|[ElementManager.getElement](#elementmanager-getelement)|table|
|[ElementManager.getElementList](#elementmanager-getelementlist)|table|
|[ElementManager.loadElement](#elementmanager-loadelement)|-|
|[ElementManager.loadElement](#elementmanager-loadelement-name)|-|Loads an element by name. This will load the element and apply any plugins to it.|
|[ElementManager.getElement](#elementmanager-getelement-name)|table|Gets an element by name. If the element is not loaded, it will try to load it first.|
|[ElementManager.getElementList](#elementmanager-getelementlist)|table|Gets a list of all elements|
|[ElementManager.getAPI](#elementmanager-getapi-name)|table|Gets an Plugin API by name|
## ElementManager.loadElement(name)
## ElementManager.getAPI(name)
Gets an Plugin API by name
Loads an element by name. This will load the element and apply any plugins to it.
### Parameters
* `name` `string` The name of the API to get
* `name` `string` The name of the element to load
### Returns
* `table` `API` The API
### Usage
```lua
ElementManager.loadElement("Button")
```
## ElementManager.getElement(name)
Gets an element by name. If the element is not loaded, it will try to load it first.
### Parameters
@@ -31,20 +34,18 @@ Gets an element by name. If the element is not loaded, it will try to load it fi
* `table` `Element` The element class
## ElementManager.getElementList()
Gets a list of all elements
### Returns
* `table` `ElementList` A list of all elements
## ElementManager.loadElement(name)
Loads an element by name. This will load the element and apply any plugins to it.
## ElementManager.getAPI(name)
Gets an Plugin API by name
### Parameters
* `name` `string` The name of the element to load
### Usage
```lua
ElementManager.loadElement("Button")
```
* `name` `string` The name of the API to get
### Returns
* `table` `API` The API