Files
Basalt2/docs/references/elements/BaseFrame.md
2025-02-26 13:51:26 +00:00

49 lines
1.7 KiB
Markdown

# BaseFrame : Container
This is the base frame class. It is the root element of all elements and the only element without a parent.
## Fields
|Field|Type|Description|
|---|---|---|
|_render|`Render`|The render object|
|_renderUpdate|`boolean`|Whether the render object needs to be updated|
## Properties
|Property|Type|Default|Description|
|---|---|---|---|
|text|term|nil|The terminal object to render to
## Functions
|Method|Returns|Description|
|---|---|---|
|[BaseFrame:setCursor](#BaseFrame:setCursor)|-|Sets the cursor position
## Protected Functions
|Method|Returns|Description|
|---|---|---|
|[BaseFrame:blit](#BaseFrame:blit)|-|Renders a text with a foreground and background color to the render Object
|[BaseFrame:char](#BaseFrame:char)|-|Handles character events
|[BaseFrame:init](#BaseFrame:init)|table|Initializes the Frame instance
|[BaseFrame:key](#BaseFrame:key)|-|Handles key events
|[BaseFrame:key_up](#BaseFrame:key_up)|-|Handles key up events
|[BaseFrame:mouse_up](#BaseFrame:mouse_up)|-|Handles mouse up events
|[BaseFrame:multiBlit](#BaseFrame:multiBlit)|-|Renders a multiBlit to the render Object
|[BaseFrame:render](#BaseFrame:render)|-|Renders the Frame
|[BaseFrame:term_resize](#BaseFrame:term_resize)|-|Resizes the Frame
|[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:setCursor(x, y, blink)
Sets the cursor position
### Parameters
* `x` `number` The x position to set the cursor to
* `y` `number` The y position to set the cursor to
* `blink` `boolean` Whether the cursor should blink