The DynamicImage provides a rectangular shaped display for a texture.
DynamicImage | The DynamicImage provides a rectangular shaped display for a texture. |
XML Definition | This is the DynamicImage xml definition. |
XML Tag | |
Optional Attributes | These are optional. |
texture | Name of the Ui Texture to display. |
slice | Slice of the associated Ui Texture to display. |
mirrorTexCoords | Allows you to display a horizontal mirror image of the texture. |
textureScale | The scale of the texture to be used for the image artwork. |
The textureScale parameter will be ignored if you explictly set the texture dimensions | with the the TexDims element or DynamicImageSetTextureDimensions() function. |
filtering | Allows you to specify the blend mode used for this texture when rendering. |
oneToOnePixels | The pixels from the texture will be directly mapped to the screen pixels. |
Elements | |
TexCoords | The texture coordinates for the top left of the DynamicImage with the texture. |
TexDims | The explicit texture dimenions to use for this image, regardless of it’s size. |
Functions | |
Functions | |
DynamicImageSetTexture() | Sets the texture displayed on this image. |
DynamicImageSetTextureScale() | Sets the textureScale value. |
DynamicImageSetTextureDimensions() | Sets the explicit texture coordinates to be used for this image. |
DynamicImageSetTextureOrientation() | Sets the texture’s mirrored orientation for this dynamic image. |
DynamicImageSetTextureSlice() | Sets the slice to be displayed in this DynamicImage. |
DynamicImageSetRotation() | Rotates the image arround it’s center. |
DynamicImageHasTexture() | Returns if the image is currently displaying a valid texture. |
This is the DynamicImage xml definition.
XML Tag | |
Optional Attributes | These are optional. |
texture | Name of the Ui Texture to display. |
slice | Slice of the associated Ui Texture to display. |
mirrorTexCoords | Allows you to display a horizontal mirror image of the texture. |
textureScale | The scale of the texture to be used for the image artwork. |
The textureScale parameter will be ignored if you explictly set the texture dimensions | with the the TexDims element or DynamicImageSetTextureDimensions() function. |
filtering | Allows you to specify the blend mode used for this texture when rendering. |
oneToOnePixels | The pixels from the texture will be directly mapped to the screen pixels. |
Elements | |
TexCoords | The texture coordinates for the top left of the DynamicImage with the texture. |
TexDims | The explicit texture dimenions to use for this image, regardless of it’s size. |
These are optional. You can use whichever apply to the DynamicImage you are creating.
Allows you to display a horizontal mirror image of the texture. This swaps the topleft and bottom left coordinates with those used for the topright and bottomright of the image.
A boolean value.
”true” | Mirror the texture coords |
”false” | Use normal texture coordinates |
The scale of the texture to be used for the image artwork. This is multiplied by the image’s <Size> to determine the texture dimensions.
A number value. (1.0 = 100%)
with the the TexDims element or DynamicImageSetTextureDimensions() function.
Allows you to specify the blend mode used for this texture when rendering.
A boolean value.
”true” | Use Bilinear Filter filtering. |
”false” | Use Nearest Neighbor filtering. |
The pixels from the texture will be directly mapped to the screen pixels. The texture will be tiled or cropped when the resolution is changed, rather than being stretched or shrunk.
A boolean value.
”true” | Use one-to-one pixels. |
”false” | Stretch or shrink the texture as usual. |
The texture coordinates for the top left of the DynamicImage with the texture. Ignored if a slice is set.
<TexCoords x="100" y="200" />
x | The x pixel coordinate of the top left of the image. |
y | The y pixel coordinate of the top left of the image. |
x | 0 |
y | 0 |
The explicit texture dimenions to use for this image, regardless of it’s size. When this element is included, any textureScale value will be ignored. This element is itself ignored if a slice is set.
<TexDims x="100" y="100" />
x | The x pixel texture size. |
y | The y pixel texture size. |
x | 0 |
y | 0 |
Functions | |
DynamicImageSetTexture() | Sets the texture displayed on this image. |
DynamicImageSetTextureScale() | Sets the textureScale value. |
DynamicImageSetTextureDimensions() | Sets the explicit texture coordinates to be used for this image. |
DynamicImageSetTextureOrientation() | Sets the texture’s mirrored orientation for this dynamic image. |
DynamicImageSetTextureSlice() | Sets the slice to be displayed in this DynamicImage. |
DynamicImageSetRotation() | Rotates the image arround it’s center. |
DynamicImageHasTexture() | Returns if the image is currently displaying a valid texture. |
Sets the texture displayed on this image.
dynamicImageName | (string) The name of the DynamicImage. |
texture | (string) The name of the Ui Texture to display. |
x | (number) The x offset of the texture coordinate. |
y | (number) the y offset of the texture coordinate. |
nil | no return value |
DynamicImageSetTexture("SomeImageWindow", "some_ui_texture" )
Sets the textureScale value.
dynamicImageName | (string) The name of the DynamicImage. |
textureScale | (number) The scale value to use on the image’s texture. (1.0 = 100%) |
nil | no return value |
DynamicImageSetTextureScale( "SomeDynamicImage", 0.5 )
Sets the explicit texture coordinates to be used for this image.
dynamicImageName | (string) The name of the DynamicImage. |
x | The x texture size. |
y | The y texture size. |
nil | no return value |
DynamicImageSetTextureDimensions( "SomeDynamicImage", 100, 200 )
Sets the texture’s mirrored orientation for this dynamic image.
dynamicImageName | (string) The name of the DynamicImage. |
mirrored | True/False if the texture should be mirrored. |
nil | no return value |
DynamicImageSetTextureOrientation( "SomeDynamicImage", true )
Sets the slice to be displayed in this DynamicImage.
dynamicImageName | (string) The name of the DynamicImage. |
sliceName | (string) Name (or id) of the slice to use. |
nil | no return value, regardless of success or failure |
DynamicImageSetTextureSlice( "SomeDynamicImage", "SomeTextureSlice" )
Rotates the image arround it’s center.
dynamicImageName | (string) The name of the DynamicImage. |
rotation | (number) The rotation angle (Degees, 0-360). |
nil | no return value |
DynamicImageSetRotation( "SomeDynamicImage", 90 )
Returns if the image is currently displaying a valid texture.
dynamicImageName | (string) The name of the DynamicImage. |
hasTexture | (boolean) Is the image currently displaying a texture? |
local imageFound = DynamicImageHasTexture( "LoadingWindowImage")