API:AnimatedImageSetTexture
From RoR Wiki
UI Lua API · AnimatedImage functions
Version: WAR 1.4.8
Changes the texture an AnimatedImage takes its frames from.
AnimatedImageSetTexture(imageName, textureName)
Arguments
- imageName
string– Name of an AnimatedImage window.- textureName
string– Name of the texture, as used in thetextureattribute of anAnimatedImageelement in XML.
Returns
Nothing.
Details
- The client loads the texture by name and rebuilds the image with it. A name that matches no texture raises no error.
- The not a ... error message says "DynamicImage", although the window must be an AnimatedImage.
Errors
Error in function call 'AnimatedImageSetTexture': Window %s does not existError in function call 'AnimatedImageSetTexture': Window %s is not a DynamicImage
Example
From the AnimatedImage frame class in easystem_windowutils/source/animatedimage.lua:
function AnimatedImage:SetAnimationTexture (textureName)
AnimatedImageSetTexture (self:GetName (), textureName)
end
