diff --git a/docs/references/elements/Button.md b/docs/references/elements/Button.md index 206816c..9b4b634 100644 --- a/docs/references/elements/Button.md +++ b/docs/references/elements/Button.md @@ -1,5 +1,4 @@ # Button : VisualElement -This is the button class. It is a visual element that can be clicked. ## Properties @@ -16,24 +15,14 @@ This is the button class. It is a visual element that can be clicked. |Method|Returns|Description| |---|---|---| -|[Button.new](#Button.new)|table|Creates a new Button instance -|[Button:init](#Button:init)|-|Initializes the Button instance -|[Button:render](#Button:render)|-|Renders the Button +|[Button.new](#Button.new)|-| +|[Button:init](#Button:init)|-| +|[Button:render](#Button:render)|-| ## Button.new() -Creates a new Button instance -### Returns -* `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:init() ## Button:render() -Renders the Button diff --git a/docs/references/elements/Checkbox.md b/docs/references/elements/Checkbox.md index b8b57c2..defd83c 100644 --- a/docs/references/elements/Checkbox.md +++ b/docs/references/elements/Checkbox.md @@ -6,8 +6,9 @@ This is the checkbox class. It is a visual element that can be checked. |Property|Type|Default|Description| |---|---|---|---| |checked|boolean|Whether|checkbox is checked -|text|string|Label|text -|symbol|string|Check|symbol +|text|string|empty|Text to display +|checkedText|string|Text|when checked +|autoSize|boolean|true|Whether to automatically size the checkbox ## Functions diff --git a/docs/references/elements/Container.md b/docs/references/elements/Container.md index bf67094..efa3349 100644 --- a/docs/references/elements/Container.md +++ b/docs/references/elements/Container.md @@ -14,6 +14,8 @@ like Frames, BaseFrames, and more. |focusedChild|table|nil|The focused child of the container |visibleChildren|table|{}|The visible children 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 diff --git a/docs/references/elements/Label.md b/docs/references/elements/Label.md index 5fdb788..3bc9614 100644 --- a/docs/references/elements/Label.md +++ b/docs/references/elements/Label.md @@ -7,12 +7,14 @@ resizes its width based on the text content. |Property|Type|Default|Description| |---|---|---|---| |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 |Method|Returns|Description| |---|---|---| |[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:render](#Label:render)|-|Renders the Label by drawing its text content @@ -27,6 +29,12 @@ Creates a new Label instance 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) Initializes the Label instance diff --git a/docs/references/elements/VisualElement.md b/docs/references/elements/VisualElement.md index 97a4a3b..4b1cafe 100644 --- a/docs/references/elements/VisualElement.md +++ b/docs/references/elements/VisualElement.md @@ -18,6 +18,7 @@ and provides core functionality for positioning, sizing, colors, and rendering. |backgroundEnabled|boolean|true|Whether to render the background |focused|boolean|false|Whether the element has input focus |visible|boolean|true|Whether the element is visible +|ignoreOffset|boolean|false|Whether to ignore the parent's offset ## 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:blit](#VisualElement:blit)|-|Draws text with both colors |[VisualElement:blur](#VisualElement:blur)|-|Handles a blur event +|[VisualElement:calculatePosition](#VisualElement:calculatePosition)|-| |[VisualElement:focus](#VisualElement:focus)|-|Handles a focus event |[VisualElement:getAbsolutePosition](#VisualElement:getAbsolutePosition)|-|Returns the absolute 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() Handles a blur event +## VisualElement:calculatePosition() + ## VisualElement:focus() Handles a focus event