API:DynamicImageSetTextureDimensions
From RoR Wiki
UI Lua API · DynamicImage functions
Version: WAR 1.4.8
Sets the size of the area of the texture that a DynamicImage shows.
DynamicImageSetTextureDimensions(imageName, width, height)
Arguments
- imageName
string– Name of a DynamicImage window.- width, height
number– Size of the area in texture pixels. Fractions are dropped.
Returns
Nothing.
Details
- The area starts at the position given to DynamicImageSetTexture and is drawn over the whole window.
- If either value is 0, the client uses the window's size divided by the texture scale instead (see DynamicImageSetTextureScale).
- Both error messages name
DynamicImageSetTextureScaleinstead ofDynamicImageSetTextureDimensions.
Errors
Error in function call 'DynamicImageSetTextureScale': Window %s does not existError in function call 'DynamicImageSetTextureScale': Window %s is not a DynamicImage
Example
From eatemplate_unitframes/source/bufftracker.lua:
DynamicImageSetTextureSlice( windowName.."Frame", buffSlice ) WindowSetDimensions( windowName.."Frame", (buffTexDimsX / 2), (buffTexDimsY / 2) + verticalSlop ) DynamicImageSetTextureDimensions( windowName.."Frame", buffTexDimsX, buffTexDimsY )
