Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:AnimatedImageSetTexture

From RoR Wiki
Revision as of 19:40, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 the texture attribute of an AnimatedImage element 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 exist
  • Error 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

See also