API:DynamicImageSetTextureSlice
From RoR Wiki
UI Lua API · DynamicImage functions
Version: WAR 1.4.8
Shows a named slice of a DynamicImage's texture.
DynamicImageSetTextureSlice(imageName, sliceName)
Arguments
- imageName
string– Name of a DynamicImage window.- sliceName
string– Name of a slice defined for the image's texture.
Returns
Nothing.
Details
- The slice name is stored on the image. If the image's texture is already loaded, the client also looks the slice up and raises Slice %s not found if it does not exist.
- The stock UI passes
""to clear the slice before calling DynamicImageSetTexture. - This function's error messages end with a full stop, unlike most others.
Errors
Error in function call 'DynamicImageSetTextureSlice': Window %s does not exist.Error in function call 'DynamicImageSetTextureSlice': Window %s is not a DynamicImage.Error in function call 'DynamicImageSetTextureSlice': Slice %s not found.(slice name)
Example
Using a slice of a shared texture, from easystem_tooltips/source/maptooltips.lua:
DynamicImageSetTexture( iconWindow, "map_markers01", 0, 0 ) DynamicImageSetTextureSlice( iconWindow, "QuestAvailable-LiveEvent" )
From easystem_threepartbar/source/ea_threepartbar.lua:
DynamicImageSetTextureSlice( self.barName.."LeftEndCap", leftTexSlice ) DynamicImageSetTextureSlice( self.barName.."RightEndCap", rightTexSlice )
