API:SetLiveEventTaskImage
From RoR Wiki
UI Lua API · LiveEvent functions
Version: WAR 1.4.8
Loads the picture of a live event task, so that its textureName can be used as a texture.
SetLiveEventTaskImage(eventId, taskId)
Arguments
- eventId
number– Event id.- taskId
number– Task id, thetaskIdfield from GetLiveEventTasks.
Returns
Nothing.
Details
- The image file is taken from
interface/InterfaceCore/Tome/LiveEvent/Images/and registered under the task'stextureName. Use that name withDynamicImageSetTexture, as the stock UI does. - Each task's picture is loaded only once; later calls for the same task do nothing. Tasks without a picture are ignored without an error.
- The function needs at least two arguments and only reads the last two.
Errors
These are written to the UI log; the call returns normally.
Error in function call 'SetLiveEventTaskImage': Event %d not found.(also for an event that exists but is inactive)Error in function call 'SetLiveEventTaskImage': Task %d not found in event %ls.Error in function call 'SetLiveEventTaskImage': The specified image was not found for task %d in event %ls.
Example
From default/ea_tomeofknowledge/source/tomewindow_liveevent.lua:
SetLiveEventTaskImage( TomeWindow.CurrentLiveEventId, task.taskId ) DynamicImageSetTexture( winName, task.textureName, 0, 0)
