UiUnloadImage
Unloads an image previously loaded with UiImage
.
Like all UI functions, this function will only exist if draw
is defined before init
is called.
This function is not officially documented.
Arguments
- string: Path to image file
Return values
None.
Example usage
function init()
visible = false
end
function draw()
UiFont("regular.ttf", 32)
UiTranslate(0, UiFontHeight())
if UiTextButton("Toggle visibility") then
visible = not visible
if not visible then
UiUnloadImage("MOD/example.png")
end
end
if visible then
UiImage("MOD/example.png")
end
end