deploy: b2d273871d
This commit is contained in:
@@ -18,6 +18,9 @@ This is the base frame class. It is the root element of all elements and the onl
|
||||
|
||||
|Method|Returns|Description|
|
||||
|---|---|---|
|
||||
|[BaseFrame:char](#BaseFrame:char)|-|
|
||||
|[BaseFrame:key](#BaseFrame:key)|-|
|
||||
|[BaseFrame:key_up](#BaseFrame:key_up)|-|
|
||||
|[BaseFrame:setCursor](#BaseFrame:setCursor)|-|Sets the cursor position
|
||||
|
||||
|
||||
@@ -34,6 +37,12 @@ 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:char()
|
||||
|
||||
## BaseFrame:key()
|
||||
|
||||
## BaseFrame:key_up()
|
||||
|
||||
## BaseFrame:setCursor(x, y, blink)
|
||||
Sets the cursor position
|
||||
|
||||
|
||||
@@ -10,18 +10,25 @@ See: https://github.com/SkyTheCodeMaster/bimg
|
||||
|bimg|table|{}|The bimg image data
|
||||
|currentFrame|number|1|Current animation frame
|
||||
|metadata|table|{}|Image metadata (version, palette, etc)
|
||||
|autoResize|boolean|false|Whether to automatically resize the image when content exceeds bounds
|
||||
|offsetX|number|0|Horizontal offset for viewing larger images
|
||||
|offsetY|number|0|Vertical offset for viewing larger images
|
||||
|
||||
## Functions
|
||||
|
||||
|Method|Returns|Description|
|
||||
|---|---|---|
|
||||
|[Image:getImageSize](#Image:getImageSize)|-|
|
||||
|[Image:getOffset](#Image:getOffset)|-|
|
||||
|[Image:getPixelData](#Image:getPixelData)|number?|Gets pixel information at position
|
||||
|[Image:loadBimg](#Image:loadBimg)|Image|Loads a bimg format image
|
||||
|[Image:nextFrame](#Image:nextFrame)|Image|Advances to the next frame in the animation
|
||||
|[Image:setBg](#Image:setBg)|-|Sets background color at position
|
||||
|[Image:setChar](#Image:setChar)|-|Sets character at position
|
||||
|[Image:setFg](#Image:setFg)|-|Sets foreground color at position
|
||||
|[Image:setPixel](#Image:setPixel)|-|Sets all properties at position
|
||||
|[Image:resizeImage](#Image:resizeImage)|-|
|
||||
|[Image:setBg](#Image:setBg)|-|
|
||||
|[Image:setFg](#Image:setFg)|-|
|
||||
|[Image:setOffset](#Image:setOffset)|-|
|
||||
|[Image:setPixel](#Image:setPixel)|-|
|
||||
|[Image:setText](#Image:setText)|-|
|
||||
|
||||
|
||||
## Protected Functions
|
||||
@@ -31,6 +38,10 @@ See: https://github.com/SkyTheCodeMaster/bimg
|
||||
|[Image:init](#Image:init)|Image|Initializes the Image instance
|
||||
|[Image:render](#Image:render)|-|Renders the Image
|
||||
|
||||
## Image:getImageSize()
|
||||
|
||||
## Image:getOffset()
|
||||
|
||||
## Image:getPixelData(x, y)
|
||||
Gets pixel information at position
|
||||
|
||||
@@ -58,38 +69,16 @@ Advances to the next frame in the animation
|
||||
### Returns
|
||||
* `Image` `self` The Image instance
|
||||
|
||||
## Image:setBg(x, y, color)
|
||||
Sets background color at position
|
||||
## Image:resizeImage()
|
||||
|
||||
### Parameters
|
||||
* `x` `number` X position
|
||||
* `y` `number` Y position
|
||||
* `color` `number` Color value (0-15)
|
||||
## Image:setBg()
|
||||
|
||||
## Image:setChar(x, y, char)
|
||||
Sets character at position
|
||||
## Image:setFg()
|
||||
|
||||
### Parameters
|
||||
* `x` `number` X position
|
||||
* `y` `number` Y position
|
||||
* `char` `string` Single character to set
|
||||
## Image:setOffset()
|
||||
|
||||
## Image:setFg(x, y, color)
|
||||
Sets foreground color at position
|
||||
## Image:setPixel()
|
||||
|
||||
### Parameters
|
||||
* `x` `number` X position
|
||||
* `y` `number` Y position
|
||||
* `color` `number` Color value (0-15)
|
||||
|
||||
## Image:setPixel(x, y, char, fg, bg)
|
||||
Sets all properties at position
|
||||
|
||||
### Parameters
|
||||
* `x` `number` X position
|
||||
* `y` `number` Y position
|
||||
* `char` `string?` Character to set (optional)
|
||||
* `fg` `number?` Foreground color (optional)
|
||||
* `bg` `number?` Background color (optional)
|
||||
## Image:setText()
|
||||
|
||||
|
||||
|
||||
@@ -50,9 +50,12 @@ and provides core functionality for positioning, sizing, colors, and rendering.
|
||||
|Method|Returns|Description|
|
||||
|---|---|---|
|
||||
|[VisualElement:calculatePosition](#VisualElement:calculatePosition)|number|Calculates the position of the element
|
||||
|[VisualElement:char](#VisualElement:char)|-|
|
||||
|[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:isInBounds](#VisualElement:isInBounds)|boolean|Checks if point is within bounds
|
||||
|[VisualElement:key](#VisualElement:key)|-|
|
||||
|[VisualElement:key_up](#VisualElement:key_up)|-|
|
||||
|[VisualElement:prioritize](#VisualElement:prioritize)|VisualElement|Prioritizes the element by moving it to the top of its parent's children
|
||||
|
||||
|
||||
@@ -83,6 +86,8 @@ Calculates the position of the element relative to its parent
|
||||
* `number` `x` The x position
|
||||
* `number` `y` The y position
|
||||
|
||||
## VisualElement:char()
|
||||
|
||||
## VisualElement:getAbsolutePosition(x?, y?)
|
||||
Returns the absolute position of the element or the given coordinates.
|
||||
|
||||
@@ -115,6 +120,10 @@ Checks if the specified coordinates are within the bounds of the element
|
||||
### Returns
|
||||
* `boolean` `isInBounds` Whether the coordinates are within the bounds of the element
|
||||
|
||||
## VisualElement:key()
|
||||
|
||||
## VisualElement:key_up()
|
||||
|
||||
## VisualElement:prioritize()
|
||||
This function is used to prioritize the element by moving it to the top of its parent's children.
|
||||
It removes the element from its parent and adds it back, effectively changing its order.
|
||||
|
||||
Reference in New Issue
Block a user