Image
The Image object is designed for adding more advanced backgrounds to your interface. It supports the loading of .nfp and .bimg images, allowing for greater customization of your interface’s appearance.
Properties
| Property | Type | Description |
|---|---|---|
| frame | number | Determines the current frame of the bimg image |
| XOffset | number | Horizontal offset of the image from its starting position |
| YOffset | number | Vertical offset of the image from its starting position |
set
This method sets the image to be displayed in the Image object.
Parameters
stringThe path to the image file you wish to use.string(optional) - The format of the image:nfporbimg.
Returns
objectThe object in use
Usage
lua
local main = basalt.createFrame()
local image = main:addImage()
image:set("dog.nfp")play
Plays a animated bimg image
Parameters
booleanoptional - infinite loop.
Returns
objectThe object in use
Usage
lua
local main = basalt.createFrame()
local image = main:addImage()
image:set("dog.bimg"):play()