benilla-re systems structs docs

Script::SetPortraitTexture

function · ui · primitive

Address
0x519ef0 · 527 bytes, up to 0x51a0fe
Signature
int __fastcall (lua_State *L)
Meaning
Clears a texture widget and binds the unit's portrait: a bake, a cached bake or a stand-in
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/portraits#setportraittexture

Finding: SetPortraitTexture in ui: unit portraits

The function raises Usage: SetPortraitTexture(texture, "unit") when the second argument is not a string, and clears the widget's texture first (the empty path). A token that names no GUID ends there. A unit object found with type mask 8 goes to the bake 0x524f60(widget, unit). With no object, a GUID whose high dword has its top nibble clear (a player) asks the name cache 0x55f080 for the record, with the callback 0x51a100 that marks the portrait dirty when the record arrives, and passes the record's GUID, race and sex to 0x525ba0. Any other GUID looks up the group's pet record (0x496420) and passes the word at +0x5a (the display id) to 0x525cb0.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 15

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