deploy: 6b37ce34b8
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
# BarChart : Graph
|
||||
This is the bar chart class. It is based on the graph element. It draws bar based points.
|
||||
|
||||
## Functions
|
||||
|
||||
|Method|Returns|Description|
|
||||
|---|---|---|
|
||||
|
||||
|
||||
## Protected Functions
|
||||
|
||||
|
||||
@@ -14,16 +14,16 @@ The base class for all UI elements in Basalt. This class provides basic properti
|
||||
|
||||
|Method|Returns|Description|
|
||||
|---|---|---|
|
||||
|[BaseElement.defineEvent](#BaseElement.defineEvent)|-|
|
||||
|[BaseElement.registerEventCallback](#BaseElement.registerEventCallback)|-|
|
||||
|[BaseElement.defineEvent](#BaseElement.defineEvent)|-|Registers a new event listener for the element (on class level)
|
||||
|[BaseElement.registerEventCallback](#BaseElement.registerEventCallback)|-|Registers a new event callback for the element (on class level)
|
||||
|[BaseElement:destroy](#BaseElement:destroy)|-|Destroys the element and cleans up all references
|
||||
|[BaseElement:fireEvent](#BaseElement:fireEvent)|table|Triggers an event and calls all registered callbacks
|
||||
|[BaseElement:getBaseFrame](#BaseElement:getBaseFrame)|table|Returns the base frame of the element
|
||||
|[BaseElement:getBaseFrame](#BaseElement:getBaseFrame)|BaseFrame|Returns the base frame of the element
|
||||
|[BaseElement:isType](#BaseElement:isType)|boolean|Checks if the element is a specific type
|
||||
|[BaseElement:listenEvent](#BaseElement:listenEvent)|table|Enables or disables event listening for a specific event
|
||||
|[BaseElement:onChange](#BaseElement:onChange)|table|Observes a property and calls a callback when it changes
|
||||
|[BaseElement:registerCallback](#BaseElement:registerCallback)|table|Registers a callback function
|
||||
|[BaseElement:updateRender](#BaseElement:updateRender)|-|Requests a render update for this element
|
||||
|[BaseElement:updateRender](#BaseElement:updateRender)|table|Requests a render update for this element
|
||||
|
||||
|
||||
## Protected Functions
|
||||
@@ -35,20 +35,25 @@ The base class for all UI elements in Basalt. This class provides basic properti
|
||||
|[BaseElement:init](#BaseElement:init)|table|Initializes the BaseElement instance
|
||||
|[BaseElement:postInit](#BaseElement:postInit)|table|Post initialization
|
||||
|
||||
## BaseElement.defineEvent()
|
||||
## BaseElement.defineEvent(class, eventName, requiredEvent?)
|
||||
Registers a new event listener for the element (on class level)
|
||||
|
||||
## BaseElement.registerEventCallback()
|
||||
### Parameters
|
||||
* `class` `table` The class to register
|
||||
* `eventName` `string` The name of the event to register
|
||||
* `requiredEvent` *(optional)* `string` The name of the required event (optional)
|
||||
|
||||
## BaseElement.registerEventCallback(class, callbackName, ...)
|
||||
Registers a new event callback for the element (on class level)
|
||||
|
||||
### Parameters
|
||||
* `class` `table` The class to register
|
||||
* `callbackName` `string` The name of the callback to register
|
||||
* `...` `string` The names of the events to register the callback for
|
||||
|
||||
## BaseElement:destroy()
|
||||
Destroys the element and cleans up all references
|
||||
|
||||
### Usage
|
||||
```lua
|
||||
element:destroy()
|
||||
```
|
||||
|
||||
## BaseElement:fireEvent(event, ...)
|
||||
Triggers an event and calls all registered callbacks
|
||||
|
||||
@@ -59,16 +64,11 @@ Triggers an event and calls all registered callbacks
|
||||
### Returns
|
||||
* `table` `self` The BaseElement instance
|
||||
|
||||
### Usage
|
||||
```lua
|
||||
element:fireEvent("mouse_click", 1, 2)
|
||||
```
|
||||
|
||||
## BaseElement:getBaseFrame()
|
||||
Returns the base frame of the element
|
||||
|
||||
### Returns
|
||||
* `table` `BaseFrame` The base frame of the element
|
||||
* `BaseFrame` `BaseFrame` The base frame of the element
|
||||
|
||||
## BaseElement:isType(type)
|
||||
Checks if the element is a specific type
|
||||
@@ -77,7 +77,7 @@ Checks if the element is a specific type
|
||||
* `type` `string` The type to check for
|
||||
|
||||
### Returns
|
||||
* `boolean` `Whether` the element is of the specified type
|
||||
* `boolean` `isType` Whether the element is of the specified type
|
||||
|
||||
## BaseElement:listenEvent(eventName, enable?)
|
||||
Enables or disables event listening for a specific event
|
||||
@@ -89,11 +89,6 @@ Enables or disables event listening for a specific event
|
||||
### Returns
|
||||
* `table` `self` The BaseElement instance
|
||||
|
||||
### Usage
|
||||
```lua
|
||||
element:listenEvent("mouse_click", true)
|
||||
```
|
||||
|
||||
## BaseElement:onChange(property, callback)
|
||||
Observes a property and calls a callback when it changes
|
||||
|
||||
@@ -114,17 +109,10 @@ Registers a callback function for an event
|
||||
### Returns
|
||||
* `table` `self` The BaseElement instance
|
||||
|
||||
### Usage
|
||||
```lua
|
||||
element:registerCallback("mouse_click", function(self, ...) end)
|
||||
```
|
||||
|
||||
## BaseElement:updateRender()
|
||||
Requests a render update for this element
|
||||
|
||||
### Usage
|
||||
```lua
|
||||
element:updateRender()
|
||||
```
|
||||
### Returns
|
||||
* `table` `self` The BaseElement instance
|
||||
|
||||
|
||||
|
||||
@@ -8,11 +8,6 @@ The BigFont element is a text element that displays large text.
|
||||
|text|string|BigFont|BigFont text
|
||||
|fontSize|number|1|The font size of the BigFont
|
||||
|
||||
## Functions
|
||||
|
||||
|Method|Returns|Description|
|
||||
|---|---|---|
|
||||
|
||||
|
||||
## Protected Functions
|
||||
|
||||
|
||||
@@ -2,10 +2,5 @@
|
||||
Basalt - Nyorie: Please don't copy paste this code to your projects, this code is slightly changed (to fit the way basalt draws stuff), if you want the original code, checkout this:
|
||||
http://www.computercraft.info/forums2/index.php?/topic/25367-bigfont-api-write-bigger-letters-v10/
|
||||
|
||||
## Functions
|
||||
|
||||
|Method|Returns|Description|
|
||||
|---|---|---|
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -7,11 +7,6 @@ The Button is a standard button element with click handling and state management
|
||||
|---|---|---|---|
|
||||
|text|string|Button|Button text
|
||||
|
||||
## Functions
|
||||
|
||||
|Method|Returns|Description|
|
||||
|---|---|---|
|
||||
|
||||
|
||||
## Protected Functions
|
||||
|
||||
|
||||
@@ -10,11 +10,6 @@ The Checkbox is a visual element that can be checked.
|
||||
|checkedText|string|Text|when checked
|
||||
|autoSize|boolean|true|Whether to automatically size the checkbox
|
||||
|
||||
## Functions
|
||||
|
||||
|Method|Returns|Description|
|
||||
|---|---|---|
|
||||
|
||||
|
||||
## Protected Functions
|
||||
|
||||
|
||||
@@ -10,11 +10,6 @@ This is the dropdown class. It is a visual element that can show a list of selec
|
||||
|selectedText|string|""|The text to show when no item is selected
|
||||
|dropSymbol|string|"\31"|The symbol to show for dropdown indication
|
||||
|
||||
## Functions
|
||||
|
||||
|Method|Returns|Description|
|
||||
|---|---|---|
|
||||
|
||||
|
||||
## Protected Functions
|
||||
|
||||
|
||||
@@ -8,11 +8,6 @@ This is the frame class. It serves as a grouping container for other elements.
|
||||
|draggable|boolean|false|Whether the frame is draggable
|
||||
|draggingMap|table|{}|The map of dragging positions
|
||||
|
||||
## Functions
|
||||
|
||||
|Method|Returns|Description|
|
||||
|---|---|---|
|
||||
|
||||
|
||||
## Protected Functions
|
||||
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
# LineChart : Graph
|
||||
This is the line chart class. It is based on the graph element. It draws lines between points.
|
||||
|
||||
## Functions
|
||||
|
||||
|Method|Returns|Description|
|
||||
|---|---|---|
|
||||
|
||||
|
||||
## Protected Functions
|
||||
|
||||
|
||||
@@ -10,11 +10,6 @@ with optional percentage display and customizable colors.
|
||||
|showPercentage|boolean|false|Whether to show the percentage text in the center
|
||||
|progressColor|color|lime|The color used for the filled portion of the progress bar
|
||||
|
||||
## Functions
|
||||
|
||||
|Method|Returns|Description|
|
||||
|---|---|---|
|
||||
|
||||
|
||||
## Protected Functions
|
||||
|
||||
|
||||
@@ -2,10 +2,5 @@
|
||||
This module provides reactive functionality for elements, it adds no new functionality for elements.
|
||||
It is used to evaluate expressions in property values and update the element when the expression changes.
|
||||
|
||||
## Functions
|
||||
|
||||
|Method|Returns|Description|
|
||||
|---|---|---|
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user