The API is no longer being updated here until further notice. |
<Texture> (inherits from <LayoutFrame>, creates a Texture widget) draws an image, solid color, or gradient.
<Texture> <TexCoords /> <Color /> <Gradient /> </Texture>
Attributes[]
- file (xs:string? ) - Loads a BLP, JPEG or TGA.
- mask (xs:string? ) - Applies a <MaskTexture>.
- alphaMode (ui:ALPHAMODE?) - Blends overlapping textures.
- alpha (xs:float? ) - Sets opacity from 0 to 1.
- scale (xs:float? ) - Scales the widget's coordinate system.
- snapToPixelGrid (xs:boolean? )
- texelSnappingBias (xs:float? )
- hWrapMode (ui:WRAPMODE)
- vWrapMode (ui:WRAPMODE)
- ignoreParentAlpha (xs:boolean? ) - Controls alpha directly or as a fraction of its parent's alpha.
- ignoreParentScale (xs:boolean? ) - Controls alpha directly or as a fraction of its parent's scale.
- nonBlocking (xs:boolean? )
- horizTile (xs:boolean? )
- vertTile (xs:boolean? )
- atlas (xs:string? ) - Loads a predefined file and coords.
- useAtlasSize (xs:boolean? )
- desaturated (xs:boolean? ) - Removes color.
Child elements[]
<TexCoords> samples part of an image file, using either four edges or a <Rect> child element.
- left (xs:float? ) -Left edge, normalized from left (0) to right (1).
- right (xs:float? ) - Right edge, normalized from left (0) to right (1).
- top (xs:float? ) - Top edge, normalized from top (0) to bottom (1).
- bottom (xs:float? ) - Bottom edge, normalized from top (0) to bottom (1).
<Rect> has eight attributes to define an affine transformation from arbitrary (non-right-angled) corners.
- ULx (xs:float) - Upper-left, x coord, normalized from left (0) to right (1).
- ULy (xs:float) - Upper-left, y coord, normalized from top (0) to bottom (1).
- LLx (xs:float) - Lower-left, x coord, normalized from left (0) to right (1).
- LLy (xs:float) - Lower-left, y coord, normalized from top (0) to bottom (1).
- URx (xs:float) - Upper-right, x coord, normalized from left (0) to right (1).
- URy (xs:float) - Upper-right, y coord, normalized from top (0) to bottom (1).
- LRx (xs:float) - Lower-right, x coord, normalized from left (0) to right (1).
- LRy (xs:float) - Lower-right, y coord, normalized from top (0) to bottom (1).
<Color> sets color using RGB values or a ColorMixin, and alpha.
- r (xs:float? ) - Red component from 0.0 (default) to 1.0.
- g (xs:float? ) - Green component from 0.0 (default) to 1.0.
- b (xs:float? ) - Blue component from 0.0 (default) to 1.0.
- a (xs:float? ) - Alpha (opacity) from 0.0 to 1.0 (default).
- name (xs:string? ) - Name of a ColorMixin made with CreateColor().
<Gradient> defines a gradient between two solid colors, <MinColor> and <MaxColor>.
- orientation (ui:ORIENTATION) - "HORIZONTAL" (default) or "VERTICAL"
<MinColor> and <MaxColor> inherit from <Color>
Example[]
<Texture name="SparkleTextureNormal" file="Interface\ItemSocketingFrame\UI-ItemSockets" alphaMode="ADD" hidden="true">
<Size>
<AbsDimension x="13" y="13"/>
</Size>
<Anchors>
<Anchor point="CENTER">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<TexCoords left="0.3984375" right="0.4453125" top="0.40234375" bottom="0.44921875"/>
</Texture>
Notes[]
- If the XML texture has no anchors, the texture object will implicitly have :SetAllPoints() called on it.