Graphics.loadImage
This function is used to load an image into the resource memory of SMBX. This image can be displayed with other functions in the Graphics category.
Usage
First, you need an image to use. The image MUST be in .png format, or it may not display correctly. The image can have true transparency; a mask image is not required. To use this function, you must set a variable that contains it:
function onLoad()
img = Graphics.loadImage("test.png")
end
This loads the image "test.png" into the resource memory of SMBX. Note that this doesn't cause the image to appear, but it makes it available to be called in other functions.
In a function for showing the image, set the variable you used as the argument for "LuaImageResource":
function onLoad()
img = Graphics.loadImage("test.png")
Graphics.placeSprite(1, img, 0, 0)
end
This will load "test.png" on the screen at position [0,0] (the top left corner).