deploy: db22ae0ba3
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
# Button : VisualElement
|
# Button : VisualElement
|
||||||
This is the button class. It is a visual element that can be clicked.
|
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
@@ -16,24 +15,14 @@ This is the button class. It is a visual element that can be clicked.
|
|||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Button.new](#Button.new)|table|Creates a new Button instance
|
|[Button.new](#Button.new)|-|
|
||||||
|[Button:init](#Button:init)|-|Initializes the Button instance
|
|[Button:init](#Button:init)|-|
|
||||||
|[Button:render](#Button:render)|-|Renders the Button
|
|[Button:render](#Button:render)|-|
|
||||||
|
|
||||||
## Button.new()
|
## Button.new()
|
||||||
Creates a new Button instance
|
|
||||||
|
|
||||||
### Returns
|
## Button:init()
|
||||||
* `table` `self` The created instance
|
|
||||||
|
|
||||||
## Button:init(props, basalt)
|
|
||||||
Initializes the Button instance
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
* `props` `table` The properties to initialize the element with
|
|
||||||
* `basalt` `table` The basalt instance
|
|
||||||
|
|
||||||
## Button:render()
|
## Button:render()
|
||||||
Renders the Button
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,9 @@ This is the checkbox class. It is a visual element that can be checked.
|
|||||||
|Property|Type|Default|Description|
|
|Property|Type|Default|Description|
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
|checked|boolean|Whether|checkbox is checked
|
|checked|boolean|Whether|checkbox is checked
|
||||||
|text|string|Label|text
|
|text|string|empty|Text to display
|
||||||
|symbol|string|Check|symbol
|
|checkedText|string|Text|when checked
|
||||||
|
|autoSize|boolean|true|Whether to automatically size the checkbox
|
||||||
|
|
||||||
## Functions
|
## Functions
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ like Frames, BaseFrames, and more.
|
|||||||
|focusedChild|table|nil|The focused child of the container
|
|focusedChild|table|nil|The focused child of the container
|
||||||
|visibleChildren|table|{}|The visible children of the container
|
|visibleChildren|table|{}|The visible children of the container
|
||||||
|visibleChildrenEvents|table|{}|The visible children events of the container
|
|visibleChildrenEvents|table|{}|The visible children events of the container
|
||||||
|
|offsetX|number|0|Horizontal content offset
|
||||||
|
|offsetY|number|0|Vertical content offset
|
||||||
|
|
||||||
## Functions
|
## Functions
|
||||||
|
|
||||||
|
|||||||
@@ -7,12 +7,14 @@ resizes its width based on the text content.
|
|||||||
|Property|Type|Default|Description|
|
|Property|Type|Default|Description|
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
|text|string|Label|The text content to display. Can be a string or a function that returns a string
|
|text|string|Label|The text content to display. Can be a string or a function that returns a string
|
||||||
|
|autoSize|boolean|true|Whether the label should automatically resize its width based on the text content
|
||||||
|
|
||||||
## Functions
|
## Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|[Label.new](#Label.new)|Label|Creates a new Label instance
|
|[Label.new](#Label.new)|Label|Creates a new Label instance
|
||||||
|
|[Label:getWrappedText](#Label:getWrappedText)|table|Gets the wrapped lines of the Label
|
||||||
|[Label:init](#Label:init)|Label|Initializes the Label instance
|
|[Label:init](#Label:init)|Label|Initializes the Label instance
|
||||||
|[Label:render](#Label:render)|-|Renders the Label by drawing its text content
|
|[Label:render](#Label:render)|-|Renders the Label by drawing its text content
|
||||||
|
|
||||||
@@ -27,6 +29,12 @@ Creates a new Label instance
|
|||||||
local label = Label.new()
|
local label = Label.new()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Label:getWrappedText()
|
||||||
|
Gets the wrapped lines of the Label
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
* `table` `wrappedText` The wrapped lines of the Label
|
||||||
|
|
||||||
## Label:init(props, basalt)
|
## Label:init(props, basalt)
|
||||||
Initializes the Label instance
|
Initializes the Label instance
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ and provides core functionality for positioning, sizing, colors, and rendering.
|
|||||||
|backgroundEnabled|boolean|true|Whether to render the background
|
|backgroundEnabled|boolean|true|Whether to render the background
|
||||||
|focused|boolean|false|Whether the element has input focus
|
|focused|boolean|false|Whether the element has input focus
|
||||||
|visible|boolean|true|Whether the element is visible
|
|visible|boolean|true|Whether the element is visible
|
||||||
|
|ignoreOffset|boolean|false|Whether to ignore the parent's offset
|
||||||
|
|
||||||
## Combined Properties
|
## Combined Properties
|
||||||
|
|
||||||
@@ -48,6 +49,7 @@ and provides core functionality for positioning, sizing, colors, and rendering.
|
|||||||
|[VisualElement.new](#VisualElement.new)|VisualElement|Creates a new visual element
|
|[VisualElement.new](#VisualElement.new)|VisualElement|Creates a new visual element
|
||||||
|[VisualElement:blit](#VisualElement:blit)|-|Draws text with both colors
|
|[VisualElement:blit](#VisualElement:blit)|-|Draws text with both colors
|
||||||
|[VisualElement:blur](#VisualElement:blur)|-|Handles a blur event
|
|[VisualElement:blur](#VisualElement:blur)|-|Handles a blur event
|
||||||
|
|[VisualElement:calculatePosition](#VisualElement:calculatePosition)|-|
|
||||||
|[VisualElement:focus](#VisualElement:focus)|-|Handles a focus event
|
|[VisualElement:focus](#VisualElement:focus)|-|Handles a focus event
|
||||||
|[VisualElement:getAbsolutePosition](#VisualElement:getAbsolutePosition)|-|Returns the absolute position of the element
|
|[VisualElement:getAbsolutePosition](#VisualElement:getAbsolutePosition)|-|Returns the absolute position of the element
|
||||||
|[VisualElement:getRelativePosition](#VisualElement:getRelativePosition)|number,|Returns the relative position of the element
|
|[VisualElement:getRelativePosition](#VisualElement:getRelativePosition)|number,|Returns the relative position of the element
|
||||||
@@ -92,6 +94,8 @@ Draws text with both foreground and background colors
|
|||||||
## VisualElement:blur()
|
## VisualElement:blur()
|
||||||
Handles a blur event
|
Handles a blur event
|
||||||
|
|
||||||
|
## VisualElement:calculatePosition()
|
||||||
|
|
||||||
## VisualElement:focus()
|
## VisualElement:focus()
|
||||||
Handles a focus event
|
Handles a focus event
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user