Documentation

UI::LoadTexture

Function

Texture@ UI::LoadTexture(const string&in filename)

Load a texture for the UI API.

string filename

The path of the texture to load. Must be relative to the root of your plugin. For legacy reasons, this can also be the user textures folder, or Openplanet's own textures folder.

Returns UI::Texture@
Texture@ UI::LoadTexture(MemoryBuffer&in buffer)

Load a texture for the UI API from a memory buffer.

MemoryBuffer buffer

The buffer to load the texture from. This must contain the raw bytes of an encoded image.

Returns UI::Texture@