Merge branch 'gh-pages' of https://github.com/Pyroxenium/Basalt2 into gh-pages

This commit is contained in:
Robert Jelic
2025-04-02 03:48:45 +02:00
5 changed files with 68 additions and 6 deletions

View File

@@ -20,6 +20,8 @@ This is the base frame class. It is the root element of all elements and the onl
|Method|Returns|Description| |Method|Returns|Description|
|---|---|---| |---|---|---|
|[BaseFrame:dispatchEvent](#baseframe-dispatchevent)|-| |[BaseFrame:dispatchEvent](#baseframe-dispatchevent)|-|
|[BaseFrame:drawBg](#baseframe-drawbg)|-|
|[BaseFrame:drawFg](#baseframe-drawfg)|-|
|[BaseFrame:setCursor](#baseframe-setcursor)|-|Sets the cursor position |[BaseFrame:setCursor](#baseframe-setcursor)|-|Sets the cursor position
@@ -29,6 +31,7 @@ This is the base frame class. It is the root element of all elements and the onl
|---|---|---| |---|---|---|
|BaseFrame:blit|-|Renders a text with a foreground and background color to the render Object |BaseFrame:blit|-|Renders a text with a foreground and background color to the render Object
|BaseFrame:char|-|Handles character events |BaseFrame:char|-|Handles character events
|BaseFrame:drawText|-|Renders a text with a background color to the render Object
|BaseFrame:init|table|Initializes the Frame instance |BaseFrame:init|table|Initializes the Frame instance
|BaseFrame:key|-|Handles key events |BaseFrame:key|-|Handles key events
|BaseFrame:key_up|-|Handles key up events |BaseFrame:key_up|-|Handles key up events
@@ -43,6 +46,10 @@ This is the base frame class. It is the root element of all elements and the onl
## BaseFrame:dispatchEvent() ## BaseFrame:dispatchEvent()
## BaseFrame:drawBg()
## BaseFrame:drawFg()
## BaseFrame:setCursor(x, y, blink) ## BaseFrame:setCursor(x, y, blink)
Sets the cursor position Sets the cursor position

View File

@@ -30,6 +30,9 @@ like Frames, BaseFrames, and more.
|[Container:addChild](#container-addchild)|Container|Adds a child to the container |[Container:addChild](#container-addchild)|Container|Adds a child to the container
|[Container:callChildrenEvent](#container-callchildrenevent)|boolean|Calls a event on all children |[Container:callChildrenEvent](#container-callchildrenevent)|boolean|Calls a event on all children
|[Container:clear](#container-clear)|Container|Clears the container |[Container:clear](#container-clear)|Container|Clears the container
|[Container:drawBg](#container-drawbg)|-|
|[Container:drawFg](#container-drawfg)|-|
|[Container:drawText](#container-drawtext)|-|
|[Container:getChild](#container-getchild)|Container?|Removes a child from the container |[Container:getChild](#container-getchild)|Container?|Removes a child from the container
|[Container:isChildVisible](#container-ischildvisible)|boolean|Returns whether a child is visible |[Container:isChildVisible](#container-ischildvisible)|boolean|Returns whether a child is visible
|[Container:registerChildEvent](#container-registerchildevent)|Container|Registers the children events of the container |[Container:registerChildEvent](#container-registerchildevent)|Container|Registers the children events of the container
@@ -89,6 +92,12 @@ Clears the container
### Returns ### Returns
* `Container` `self` The container instance * `Container` `self` The container instance
## Container:drawBg()
## Container:drawFg()
## Container:drawText()
## Container:getChild(path) ## Container:getChild(path)
Removes a child from the container Removes a child from the container

View File

@@ -50,6 +50,9 @@ and provides core functionality for positioning, sizing, colors, and rendering.
|Method|Returns|Description| |Method|Returns|Description|
|---|---|---| |---|---|---|
|[VisualElement:calculatePosition](#visualelement-calculateposition)|number|Calculates the position of the element |[VisualElement:calculatePosition](#visualelement-calculateposition)|number|Calculates the position of the element
|[VisualElement:drawBg](#visualelement-drawbg)|-|
|[VisualElement:drawFg](#visualelement-drawfg)|-|
|[VisualElement:drawText](#visualelement-drawtext)|-|
|[VisualElement:getAbsolutePosition](#visualelement-getabsoluteposition)|number|Returns the absolute position of the element |[VisualElement:getAbsolutePosition](#visualelement-getabsoluteposition)|number|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
|[VisualElement:isInBounds](#visualelement-isinbounds)|boolean|Checks if point is within bounds |[VisualElement:isInBounds](#visualelement-isinbounds)|boolean|Checks if point is within bounds
@@ -74,6 +77,7 @@ and provides core functionality for positioning, sizing, colors, and rendering.
|VisualElement:mouse_scroll|boolean|Handles a mouse scroll event |VisualElement:mouse_scroll|boolean|Handles a mouse scroll event
|VisualElement:mouse_up|boolean|Handles a mouse up event |VisualElement:mouse_up|boolean|Handles a mouse up event
|VisualElement:multiBlit|-|Multi-character drawing with colors |VisualElement:multiBlit|-|Multi-character drawing with colors
|VisualElement:postRender|-|Post-rendering function for the element
|VisualElement:render|-|Renders the element |VisualElement:render|-|Renders the element
|VisualElement:setCursor|VisualElement|Sets the cursor position |VisualElement:setCursor|VisualElement|Sets the cursor position
|VisualElement:textBg|-|Draws text with background color |VisualElement:textBg|-|Draws text with background color
@@ -86,6 +90,12 @@ Calculates the position of the element relative to its parent
* `number` `x` The x position * `number` `x` The x position
* `number` `y` The y position * `number` `y` The y position
## VisualElement:drawBg()
## VisualElement:drawFg()
## VisualElement:drawText()
## VisualElement:getAbsolutePosition(x?, y?) ## VisualElement:getAbsolutePosition(x?, y?)
Returns the absolute position of the element or the given coordinates. Returns the absolute position of the element or the given coordinates.

View File

@@ -32,24 +32,24 @@ Dumps debug information for this element
|Method|Returns|Description| |Method|Returns|Description|
|---|---|---| |---|---|---|
|[BaseFrame.hideDebugLog](#baseframe-hidedebuglog)|-|Hides the debug log frame |[BaseFrame.closeConsole](#baseframe-closeconsole)|-|Hides the debug log frame
|[BaseFrame.showDebugLog](#baseframe-showdebuglog)|-|Shows the debug log frame |[BaseFrame.openConsole](#baseframe-openconsole)|-|Shows the debug log frame
|[BaseFrame.toggleDebugLog](#baseframe-toggledebuglog)|-|Toggles the debug log frame |[BaseFrame.toggleConsole](#baseframe-toggleconsole)|-|Toggles the debug log frame
## BaseFrame.hideDebugLog(self) ## BaseFrame.closeConsole(self)
Hides the debug log frame Hides the debug log frame
### Parameters ### Parameters
* `self` `BaseFrame` The frame to hide debug log for * `self` `BaseFrame` The frame to hide debug log for
## BaseFrame.showDebugLog(self) ## BaseFrame.openConsole(self)
Shows the debug log frame Shows the debug log frame
### Parameters ### Parameters
* `self` `BaseFrame` The frame to show debug log in * `self` `BaseFrame` The frame to show debug log in
## BaseFrame.toggleDebugLog(self) ## BaseFrame.toggleConsole(self)
Toggles the debug log frame Toggles the debug log frame
### Parameters ### Parameters

View File

@@ -21,10 +21,12 @@ functionality. It also has a buffer system to reduce the number of calls
|[Render.new](#render-new)|Render| |[Render.new](#render-new)|Render|
|[Render:addDirtyRect](#render-adddirtyrect)|Render| |[Render:addDirtyRect](#render-adddirtyrect)|Render|
|[Render:bg](#render-bg)|Render| |[Render:bg](#render-bg)|Render|
|[Render:bg](#render-bg)|Render|
|[Render:blit](#render-blit)|Render| |[Render:blit](#render-blit)|Render|
|[Render:clear](#render-clear)|Render| |[Render:clear](#render-clear)|Render|
|[Render:clearArea](#render-cleararea)|Render| |[Render:clearArea](#render-cleararea)|Render|
|[Render:fg](#render-fg)|Render| |[Render:fg](#render-fg)|Render|
|[Render:fg](#render-fg)|Render|
|[Render:getSize](#render-getsize)|number,| |[Render:getSize](#render-getsize)|number,|
|[Render:mergeRects](#render-mergerects)|Render| |[Render:mergeRects](#render-mergerects)|Render|
|[Render:multiBlit](#render-multiblit)|Render| |[Render:multiBlit](#render-multiblit)|Render|
@@ -33,6 +35,7 @@ functionality. It also has a buffer system to reduce the number of calls
|[Render:setCursor](#render-setcursor)|Render| |[Render:setCursor](#render-setcursor)|Render|
|[Render:setSize](#render-setsize)|Render| |[Render:setSize](#render-setsize)|Render|
|[Render:text](#render-text)|Render| |[Render:text](#render-text)|Render|
|[Render:text](#render-text)|Render|
|[Render:textBg](#render-textbg)|Render| |[Render:textBg](#render-textbg)|Render|
|[Render:textFg](#render-textfg)|Render| |[Render:textFg](#render-textfg)|Render|
@@ -69,6 +72,17 @@ Blits a background color to the screen
### Returns ### Returns
* `nil` `nil` nil * `nil` `nil` nil
## Render:bg(x, y, bg)
Blits a background color to the screen
### Parameters
* `x` `number` The x position
* `y` `number` The y position
* `bg` `string` The background color to blit
### Returns
* `nil` `nil` nil
## Render:blit(x, y, text, fg, bg) ## Render:blit(x, y, text, fg, bg)
Blits text to the screen Blits text to the screen
@@ -115,6 +129,17 @@ Blits a foreground color to the screen
### Returns ### Returns
* `nil` `nil` nil * `nil` `nil` nil
## Render:fg(x, y, fg)
Blits a foreground color to the screen
### Parameters
* `x` `number` The x position
* `y` `number` The y position
* `fg` `string` The foreground color to blit
### Returns
* `nil` `nil` nil
## Render:getSize() ## Render:getSize()
Gets the size of the render Gets the size of the render
@@ -194,6 +219,17 @@ Blits text to the screen
### Returns ### Returns
* `nil` `nil` nil * `nil` `nil` nil
## Render:text(x, y, text)
Renders the text to the screen
### Parameters
* `x` `number` The x position to blit to
* `y` `number` The y position to blit to
* `text` `string` The text to blit
### Returns
* `nil` `nil` nil
## Render:textBg(x, y, text, bg) ## Render:textBg(x, y, text, bg)
Blits text to the screen with a background color Blits text to the screen with a background color