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|
|
|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
|
|[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: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: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)
|
## BaseFrame:setCursor(x, y, blink)
|
||||||
Sets the cursor position
|
Sets the cursor position
|
||||||
|
|
||||||
|
|||||||
@@ -10,18 +10,25 @@ See: https://github.com/SkyTheCodeMaster/bimg
|
|||||||
|bimg|table|{}|The bimg image data
|
|bimg|table|{}|The bimg image data
|
||||||
|currentFrame|number|1|Current animation frame
|
|currentFrame|number|1|Current animation frame
|
||||||
|metadata|table|{}|Image metadata (version, palette, etc)
|
|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
|
## Functions
|
||||||
|
|
||||||
|Method|Returns|Description|
|
|Method|Returns|Description|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|
|[Image:getImageSize](#Image:getImageSize)|-|
|
||||||
|
|[Image:getOffset](#Image:getOffset)|-|
|
||||||
|[Image:getPixelData](#Image:getPixelData)|number?|Gets pixel information at position
|
|[Image:getPixelData](#Image:getPixelData)|number?|Gets pixel information at position
|
||||||
|[Image:loadBimg](#Image:loadBimg)|Image|Loads a bimg format image
|
|[Image:loadBimg](#Image:loadBimg)|Image|Loads a bimg format image
|
||||||
|[Image:nextFrame](#Image:nextFrame)|Image|Advances to the next frame in the animation
|
|[Image:nextFrame](#Image:nextFrame)|Image|Advances to the next frame in the animation
|
||||||
|[Image:setBg](#Image:setBg)|-|Sets background color at position
|
|[Image:resizeImage](#Image:resizeImage)|-|
|
||||||
|[Image:setChar](#Image:setChar)|-|Sets character at position
|
|[Image:setBg](#Image:setBg)|-|
|
||||||
|[Image:setFg](#Image:setFg)|-|Sets foreground color at position
|
|[Image:setFg](#Image:setFg)|-|
|
||||||
|[Image:setPixel](#Image:setPixel)|-|Sets all properties at position
|
|[Image:setOffset](#Image:setOffset)|-|
|
||||||
|
|[Image:setPixel](#Image:setPixel)|-|
|
||||||
|
|[Image:setText](#Image:setText)|-|
|
||||||
|
|
||||||
|
|
||||||
## Protected Functions
|
## Protected Functions
|
||||||
@@ -31,6 +38,10 @@ See: https://github.com/SkyTheCodeMaster/bimg
|
|||||||
|[Image:init](#Image:init)|Image|Initializes the Image instance
|
|[Image:init](#Image:init)|Image|Initializes the Image instance
|
||||||
|[Image:render](#Image:render)|-|Renders the Image
|
|[Image:render](#Image:render)|-|Renders the Image
|
||||||
|
|
||||||
|
## Image:getImageSize()
|
||||||
|
|
||||||
|
## Image:getOffset()
|
||||||
|
|
||||||
## Image:getPixelData(x, y)
|
## Image:getPixelData(x, y)
|
||||||
Gets pixel information at position
|
Gets pixel information at position
|
||||||
|
|
||||||
@@ -58,38 +69,16 @@ Advances to the next frame in the animation
|
|||||||
### Returns
|
### Returns
|
||||||
* `Image` `self` The Image instance
|
* `Image` `self` The Image instance
|
||||||
|
|
||||||
## Image:setBg(x, y, color)
|
## Image:resizeImage()
|
||||||
Sets background color at position
|
|
||||||
|
|
||||||
### Parameters
|
## Image:setBg()
|
||||||
* `x` `number` X position
|
|
||||||
* `y` `number` Y position
|
|
||||||
* `color` `number` Color value (0-15)
|
|
||||||
|
|
||||||
## Image:setChar(x, y, char)
|
## Image:setFg()
|
||||||
Sets character at position
|
|
||||||
|
|
||||||
### Parameters
|
## Image:setOffset()
|
||||||
* `x` `number` X position
|
|
||||||
* `y` `number` Y position
|
|
||||||
* `char` `string` Single character to set
|
|
||||||
|
|
||||||
## Image:setFg(x, y, color)
|
## Image:setPixel()
|
||||||
Sets foreground color at position
|
|
||||||
|
|
||||||
### Parameters
|
## Image:setText()
|
||||||
* `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)
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -50,9 +50,12 @@ 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:char](#VisualElement:char)|-|
|
||||||
|[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
|
||||||
|
|[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
|
|[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` `x` The x position
|
||||||
* `number` `y` The y position
|
* `number` `y` The y position
|
||||||
|
|
||||||
|
## VisualElement:char()
|
||||||
|
|
||||||
## 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.
|
||||||
|
|
||||||
@@ -115,6 +120,10 @@ Checks if the specified coordinates are within the bounds of the element
|
|||||||
### Returns
|
### Returns
|
||||||
* `boolean` `isInBounds` Whether the coordinates are within the bounds of the element
|
* `boolean` `isInBounds` Whether the coordinates are within the bounds of the element
|
||||||
|
|
||||||
|
## VisualElement:key()
|
||||||
|
|
||||||
|
## VisualElement:key_up()
|
||||||
|
|
||||||
## VisualElement:prioritize()
|
## VisualElement:prioritize()
|
||||||
This function is used to prioritize the element by moving it to the top of its parent's children.
|
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.
|
It removes the element from its parent and adds it back, effectively changing its order.
|
||||||
|
|||||||
Reference in New Issue
Block a user