API:TomeGetSigilDisplayInfo
From RoR Wiki
UI Lua API · Tome functions
Version: WAR 1.4.8
Returns the short name and button image slice of a sigil, as shown on the target unit frame.
info = TomeGetSigilDisplayInfo(sigilEntryId)
Arguments
- sigilEntryId
number– Sigil entry id. Only the low 16 bits are used.
Returns
- info
table– The display data, or nothing if the id is invalid or the player is not in the world.
| Key | Type | Meaning |
|---|---|---|
id |
number |
Sigil entry id. |
name |
wstring |
Short name of the sigil; empty if the name table is not loaded. |
sliceName |
string |
Name of a texture slice. The stock UI uses it, and the same name with "-rollover" added, as slices of the EA_HUD_01 texture.
|
Details
- Exactly one argument must be passed.
Errors
These are written to the UI log, and the function returns nothing.
Error in function call 'TomeGetSigilDisplayInfo': %d is not a valid entry id.
Example
From default/eatemplate_unitframes/source/targetunitframe.lua:
HostileUnitSigilDisplayInfo = TomeGetSigilDisplayInfo( sigilEntryId ) local buttonName = self:GetName().."SigilButton" local normalSlice = HostileUnitSigilDisplayInfo.sliceName local rolloverSlice = HostileUnitSigilDisplayInfo.sliceName.."-rollover" ButtonSetTextureSlice(buttonName, Button.ButtonState.NORMAL, "EA_HUD_01", normalSlice); ButtonSetTextureSlice(buttonName, Button.ButtonState.HIGHLIGHTED, "EA_HUD_01", rolloverSlice);
