This commit is contained in:
NoryiE
2025-02-24 22:13:57 +00:00
parent 5513bf4072
commit c3f9dfa735
38 changed files with 42 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ The base class for all UI elements in Basalt. This class provides basic properti
|[BaseElement:registerCallback](#BaseElement:registerCallback)|table|Registers a callback function
|[BaseElement:updateRender](#BaseElement:updateRender)|-|Requests a render update for this element
## BaseElement.defineEvent()
## BaseElement.new(props, basalt)

View File

@@ -27,6 +27,7 @@ This is the base frame class. It is the root element of all elements and the onl
|[BaseFrame:textBg](#BaseFrame:textBg)|-|Renders a text with a background color to the render Object
|[BaseFrame:textFg](#BaseFrame:textFg)|-|Renders a text with a foreground color to the render Object
## BaseFrame.new()
Creates a new Frame instance

View File

@@ -21,6 +21,7 @@ The Button is a standard button element with click handling and state management
|[Button:init](#Button:init)|-|Initializes the Button instance
|[Button:render](#Button:render)|-|Renders the Button
## Button.new()
Creates a new Button instance

View File

@@ -19,6 +19,7 @@ The Checkbox is a visual element that can be checked.
|[Checkbox:mouse_click](#Checkbox:mouse_click)|boolean|Handles mouse click events
|[Checkbox:render](#Checkbox:render)|-|Renders the Checkbox
## Checkbox.new()
Creates a new Checkbox instance

View File

@@ -52,6 +52,7 @@ like Frames, BaseFrames, and more.
|[Container:textFg](#Container:textFg)|Container|Draws a line of text and fg as color
|[Container:unregisterChildEvent](#Container:unregisterChildEvent)|Container|Unregisters the children events of the container
## Container.new()
Creates a new Container instance

View File

@@ -19,6 +19,7 @@ This is the dropdown class. It is a visual element that can show a list of selec
|[Dropdown:mouse_click](#Dropdown:mouse_click)|boolean|Handles mouse click events
|[Dropdown:render](#Dropdown:render)|-|Renders the Dropdown
## Dropdown.new()
Creates a new Dropdown instance

View File

@@ -22,6 +22,7 @@ This is the Flexbox class. It is a container that arranges its children in a fle
|[Flexbox:removeChild](#Flexbox:removeChild)|Flexbox|Removes a child element from the flexbox
|[Flexbox:render](#Flexbox:render)|Flexbox|Renders the flexbox and its children
## Flexbox.new()
Creates a new Flexbox instance

View File

@@ -8,6 +8,7 @@ This is the frame class. It serves as a grouping container for other elements.
|[Frame.new](#Frame.new)|Frame|Creates a new Frame instance
|[Frame:init](#Frame:init)|Frame|Initializes the Frame instance
## Frame.new()
Creates a new Frame instance

View File

@@ -26,6 +26,7 @@ See: https://github.com/SkyTheCodeMaster/bimg
|[Image:setFg](#Image:setFg)|-|
|[Image:setPixel](#Image:setPixel)|-|
## Image.new()
## Image:getPixelData(x, y)

View File

@@ -30,6 +30,7 @@ cursor movement, text manipulation, placeholder text, and input validation.
|[Input:render](#Input:render)|-|Renders the input element
|[Input:updateViewport](#Input:updateViewport)|-|Updates the input's viewport
## Input.new()
Creates a new Input instance

View File

@@ -18,6 +18,7 @@ resizes its width based on the text content.
|[Label:init](#Label:init)|Label|Initializes the Label instance
|[Label:render](#Label:render)|-|Renders the Label by drawing its text content
## Label.new()
Creates a new Label instance

View File

@@ -36,6 +36,7 @@ custom item rendering, separators, and selection handling.
|[List:scrollToBottom](#List:scrollToBottom)|List|Scrolls the list to the bottom
|[List:scrollToTop](#List:scrollToTop)|List|Scrolls the list to the top
## List.new()
Creates a new List instance

View File

@@ -18,6 +18,7 @@ Menu items are displayed in a single row and can have custom colors and callback
|[Menu:render](#Menu:render)|-|Renders the menu horizontally with proper spacing and colors
|[Menu:setItems](#Menu:setItems)|Menu|Sets the menu items and calculates total width
## Menu.new()
Creates a new Menu instance

View File

@@ -20,6 +20,7 @@ This is the program class. It provides a program that runs in a window.
|[Program:init](#Program:init)|Program|Initializes the Program instance
|[Program:render](#Program:render)|-|Renders the program
## Program.new()
Creates a new Program instance

View File

@@ -18,6 +18,7 @@ with optional percentage display and customizable colors.
|[ProgressBar:init](#ProgressBar:init)|ProgressBar|Initializes the ProgressBar instance
|[ProgressBar:render](#ProgressBar:render)|-|Renders the progress bar with filled portion and optional percentage text
## ProgressBar.new()
Creates a new ProgressBar instance

View File

@@ -34,6 +34,7 @@ A scrollbar element that can be attached to other elements to control their scro
|[Scrollbar:render](#Scrollbar:render)|-|Renders the scrollbar
|[Scrollbar:updateAttachedElement](#Scrollbar:updateAttachedElement)|Scrollbar|Updates the attached element's property based on the scrollbar value
## Scrollbar.new()
Creates a new Scrollbar instance

View File

@@ -29,6 +29,7 @@ with customizable colors and value ranges.
|[Slider:mouse_scroll](#Slider:mouse_scroll)|boolean|Handles mouse release events
|[Slider:render](#Slider:render)|-|Renders the slider with track and handle
## Slider.new()
Creates a new Slider instance

View File

@@ -27,6 +27,7 @@ row selection, and scrolling capabilities.
|[Table:render](#Table:render)|-|Renders the table with headers, data and scrollbar
|[Table:sortData](#Table:sortData)|Table|Sorts the table data by the specified column
## Table.new()
Creates a new Table instance

View File

@@ -30,6 +30,7 @@ A multi-line text editor component with cursor support and text manipulation fea
|[TextBox:setText](#TextBox:setText)|TextBox|Sets the text of the TextBox
|[TextBox:updateViewport](#TextBox:updateViewport)|TextBox|Updates the viewport to keep the cursor in view
## TextBox.new()
Creates a new TextBox instance

View File

@@ -29,6 +29,7 @@ with support for selection and scrolling.
|[Tree:render](#Tree:render)|-|Renders the tree with nodes, selection and scrolling
|[Tree:toggleNode](#Tree:toggleNode)|Tree|Toggles between expanded and collapsed state
## Tree.new()
Creates a new Tree instance

View File

@@ -70,6 +70,7 @@ and provides core functionality for positioning, sizing, colors, and rendering.
|[VisualElement:textBg](#VisualElement:textBg)|-|Draws text with background color
|[VisualElement:textFg](#VisualElement:textFg)|-|Draws text with foreground color
## VisualElement.new(props, basalt)
Creates a new VisualElement instance