API:TomeSetAchievementsSubTypeImage
From RoR Wiki
UI Lua API · Tome functions
Version: WAR 1.4.8
Loads the picture of an achievement subtype into the texture achievements_subtype_image.
TomeSetAchievementsSubTypeImage(subTypeId)
Arguments
- subTypeId
number– Achievement subtype id. The subtype must be unlocked.
Returns
Nothing.
Details
- The image file is taken from
interface/InterfaceCore/Tome/Achievements/Images/, using the file name stored for the subtype. - The texture
achievements_subtype_imageis then updated, so every window that uses it shows the new picture. - If the subtype has no picture, or the file does not exist, the texture is cleared.
- If the id is unknown or the subtype is locked, the texture is cleared and 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 'TomeSetAchievementsSubTypeImage: You have not yet unlocked an achievement of subtype # %d.(the quote after the function name is missing in the client's text)
Example
From default/ea_tomeofknowledge/source/tomewindow_achievements.lua:
LabelSetText("AchievementsSubTypeInfoName", wstring.upper( subTypeData.name ) )
-- Set the Image
TomeSetAchievementsSubTypeImage( subTypeData.id )
