benilla-re systems structs docs

Texture::SetTexture

function · ui · primitive

Address
0x79bb40 · 687 bytes, up to 0x79bdee
Signature
int __fastcall (lua_State *L)
Meaning
Loads an image file, sets a solid fill from numbers or clears the image, answering 1 or nil
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/texture#settexture
Test
ui::luabind_79a_set_vertex_color

Finding: SetTexture in ui: texture colour and drawing

SetTexture(file) loads the image with the wrap flag off, the filter value at 0x878cf0 and shader index 0, and answers the number 1, or nil when the load fails. SetTexture(r, g, b[, a]) with a number sets the solid fill instead. SetTexture(nil), a value that is not a string or a number, and the empty string "" all clear the image, keep the shader slot and answer 1. Setting the file the texture already shows is a no-op that keeps everything else. A different file also replaces the pixel-shader slot with the shader of index 0, which is none, so it ends desaturation.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 14

Calls and jumps by a bare address, from tables/calls.tsv.