Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:TomeSetWarJournalGlyphImage

From RoR Wiki

UI Lua API · Tome functions
Version: WAR 1.4.8

Loads the picture of a War Journal glyph, so that the glyph's textureName can be used as a texture.

TomeSetWarJournalGlyphImage(glyphId)

Arguments

glyphId
number – Glyph id, the id of a glyph in the glyphActivities of TomeGetWarJournalEntryData.

Returns

Nothing.

Details

  • The image file is taken from interface/InterfaceCore/Tome/WarJournal/Images/, using the file name stored for the glyph. The stock UI then shows it with DynamicImageSetTexture( window, glyphData.textureName, 64, 64 ).
  • If the picture is already loaded, it is not loaded again.
  • If the glyph is unknown, has no picture, or the file does not exist, an error is logged.
  • Exactly one argument must be passed.

Errors

These are written to the UI log; the call returns normally.

  • Error in function call 'TomeSetWarJournalEntryImage: The specified image was not found for glyph # %d. (the message names TomeSetWarJournalEntryImage, and the quote after the function name is missing)

Example

From default/ea_tomeofknowledge/source/tomewindow_warjournal.lua:

-- Set the Id
WindowSetId( glyphWindowName, glyphData.id )

-- Set the image in C
TomeSetWarJournalGlyphImage( glyphData.id )

-- Set the texture
DynamicImageSetTexture( glyphWindowName, glyphData.textureName, 64, 64 )

See also