DynamicImage

The DynamicImage provides a rectangular shaped display for a texture.

Summary
DynamicImageThe DynamicImage provides a rectangular shaped display for a texture.
XML DefinitionThis is the DynamicImage xml definition.
XML Tag
Optional AttributesThese are optional.
textureName of the Ui Texture to display.
sliceSlice of the associated Ui Texture to display.
mirrorTexCoordsAllows you to display a horizontal mirror image of the texture.
textureScaleThe scale of the texture to be used for the image artwork.
The textureScale parameter will be ignored if you explictly set the texture dimensionswith the the TexDims element or DynamicImageSetTextureDimensions() function.
filteringAllows you to specify the blend mode used for this texture when rendering.
oneToOnePixelsThe pixels from the texture will be directly mapped to the screen pixels.
Elements
TexCoordsThe texture coordinates for the top left of the DynamicImage with the texture.
TexDimsThe 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.

XML Definition

This is the DynamicImage xml definition.

Summary
XML Tag
Optional AttributesThese are optional.
textureName of the Ui Texture to display.
sliceSlice of the associated Ui Texture to display.
mirrorTexCoordsAllows you to display a horizontal mirror image of the texture.
textureScaleThe scale of the texture to be used for the image artwork.
The textureScale parameter will be ignored if you explictly set the texture dimensionswith the the TexDims element or DynamicImageSetTextureDimensions() function.
filteringAllows you to specify the blend mode used for this texture when rendering.
oneToOnePixelsThe pixels from the texture will be directly mapped to the screen pixels.
Elements
TexCoordsThe texture coordinates for the top left of the DynamicImage with the texture.
TexDimsThe explicit texture dimenions to use for this image, regardless of it’s size.

XML Tag

<DynamicImage>
....
</DynamicImage>

Optional Attributes

These are optional.  You can use whichever apply to the DynamicImage you are creating.

texture

Name of the Ui Texture to display.

Expects

A string value, which is the name of a valid ui Texture.

Default Value

  • ””

slice

Slice of the associated Ui Texture to display.

Expects

A string value, which is the name of a <Slice> declared in the Texture definition.

Default Value

  • ””

mirrorTexCoords

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.

Expects

A boolean value.

”true”Mirror the texture coords
”false”Use normal texture coordinates

Default Value

  • ”false”

textureScale

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.

Expects

A number value.  (1.0 = 100%)

Default Value

  • 1.0

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.

Expects

A boolean value.

”true”Use Bilinear Filter filtering.
”false”Use Nearest Neighbor filtering.

Default Value

  • ”true”

oneToOnePixels

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.

Expects

A boolean value.

”true”Use one-to-one pixels.
”false”Stretch or shrink the texture as usual.

Default Value

  • ”false”

Elements

TexCoords

The texture coordinates for the top left of the DynamicImage with the texture.  Ignored if a slice is set.

Syntax

<TexCoords x="100" y="200" />
xThe x pixel coordinate of the top left of the image.
yThe y pixel coordinate of the top left of the image.

Defaults

x0
y0

TexDims

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.

Syntax

<TexDims x="100" y="100" />
xThe x pixel texture size.
yThe y pixel texture size.

Defaults

x0
y0

Functions

Summary
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.

Functions

DynamicImageSetTexture()

Sets the texture displayed on this image.

Parameters

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.

Returns

nilno return value

Related XML

Notes

  • none

Example

DynamicImageSetTexture("SomeImageWindow", "some_ui_texture" )

DynamicImageSetTextureScale()

Sets the textureScale value.

Parameters

dynamicImageName(string) The name of the DynamicImage.
textureScale(number) The scale value to use on the image’s texture.  (1.0 = 100%)

Returns

nilno return value

Related XML

Notes

  • none

Example

DynamicImageSetTextureScale( "SomeDynamicImage", 0.5 )

DynamicImageSetTextureDimensions()

Sets the explicit texture coordinates to be used for this image.

Parameters

dynamicImageName(string) The name of the DynamicImage.
xThe x texture size.
yThe y texture size.

Returns

nilno return value

Related XML

Notes

  • Once this is set, the textureScale and <Size> will be ignored.

Example

DynamicImageSetTextureDimensions( "SomeDynamicImage", 100, 200 )

DynamicImageSetTextureOrientation()

Sets the texture’s mirrored orientation for this dynamic image.

Parameters

dynamicImageName(string) The name of the DynamicImage.
mirroredTrue/False if the texture should be mirrored.

Returns

nilno return value

Example

DynamicImageSetTextureOrientation( "SomeDynamicImage", true )

DynamicImageSetTextureSlice()

Sets the slice to be displayed in this DynamicImage.

Parameters

dynamicImageName(string) The name of the DynamicImage.
sliceName(string) Name (or id) of the slice to use.

Returns

nilno return value, regardless of success or failure

Related XML

Notes

Example

DynamicImageSetTextureSlice( "SomeDynamicImage", "SomeTextureSlice" )

DynamicImageSetRotation()

Rotates the image arround it’s center.

Parameters

dynamicImageName(string) The name of the DynamicImage.
rotation(number) The rotation angle (Degees, 0-360).

Returns

nilno return value

Notes

  • This function will only rotate the image’s artwork.  This will not rotate the actually window.  This means that all button clicks, mouseover, etcetera will continue to use the origional orientation.

Example

DynamicImageSetRotation( "SomeDynamicImage", 90 )

DynamicImageHasTexture()

Returns if the image is currently displaying a valid texture.

Parameters

dynamicImageName(string) The name of the DynamicImage.

Returns

hasTexture(boolean) Is the image currently displaying a texture?

Notes

  • none

Example

local imageFound = DynamicImageHasTexture( "LoadingWindowImage")
This element defines a single art texture component.
The explicit texture dimenions to use for this image, regardless of it’s size.
Sets the explicit texture coordinates to be used for this image.
Name of the Ui Texture to display.
The DynamicImage provides a rectangular shaped display for a texture.
The scale of the texture to be used for the image artwork.
The texture coordinates for the top left of the DynamicImage with the texture.
Sets the texture displayed on this image.