Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:DynamicImageHasTexture

From RoR Wiki
Revision as of 19:42, 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 · DynamicImage functions
Version: WAR 1.4.8

Returns whether a DynamicImage has a usable texture.

hasTexture = DynamicImageHasTexture(imageName)

Arguments

imageName
string – Name of a DynamicImage window.

Returns

hasTexture
boolean – true if the image has a texture.

Details

  • Once the image has loaded its texture, the result tells whether that load produced a texture.
  • Before that, the client looks the image's texture name up and returns true if a texture with that name is found.
  • Both error messages name DynamicImageSetRotation instead of DynamicImageHasTexture.

Errors

  • Error in function call 'DynamicImageSetRotation': Window %s does not exist
  • Error in function call 'DynamicImageSetRotation': Window %s is not a DynamicImage

Example

Placing text below an image only when the image has a texture, from ea_tomeofknowledge/source/tomewindow_bestiary.lua:

WindowClearAnchors( "BestiarySpeciesInfoText1" )
if( DynamicImageHasTexture( "BestiarySpeciesInfoImage" ) ) then
   WindowAddAnchor( "BestiarySpeciesInfoText1", "bottom", "BestiarySpeciesInfoImage", "top", 0, 10 )
else
   WindowAddAnchor( "BestiarySpeciesInfoText1", "top", "BestiarySpeciesInfoImage", "top", 0, 0 )
end

See also