Wikia

WoWWiki

XML/Texture

Talk0
102,090pages on
this wiki

< XML

Revision as of 04:50, September 20, 2013 by Celess22 (Talk | contribs)

(diff) ←Older revision | Latest revision (diff) | Newer revision → (diff)
XML UI ← XML elements < Texture

A Texture is a LayoutFrame XML element that describes a graphic or display in the UI. Textures, along with FontStrings are layered UI elements, meaning they must be in a <Layers><Layer> tag.

ElementsEdit

Attributes Edit

  • file (string) - resource file path to the texture image
  • alphaMode (ALPHAMODE) - Blending mode

SummaryEdit

The graphic may be an image loaded by Blizzard or an addon, or it may be a solid color or gradient. Textures support partially transparent images and different strategies for blending these into other images. They may be changed to show only a portion of a loaded image using texture coordinates. Note: The Texture must be within a <Layer>

ExampleEdit

<Texture name="MyTexture" file="Interface\ItemSocketingFrame\UI-ItemSockets" alphaMode="ADD">
  <Size>
    <AbsDimension x="13" y="13"/>
  </Size>
  <Anchors>
    <Anchor point="CENTER">
      <Offset>
        <AbsDimension x="0" y="0"/>
      </Offset>
    </Anchor>
  </Anchors>
  <TexCoords left="0.398" right="0.445" top="0.402" bottom="0.449"/>
</Texture>

DetailsEdit

ImagesEdit

Textures are the means to display images in the game. The image must be either a TGA or BLP image file. Textures may only load images whose dimensions are powers of two, such as 2x2, 4x8, and so on. Images that have non-power of two dimensions will show up as solid green textures. The image does not need to be square, however, so rectangular dimensions like 32x128 are also valid.

Virtual TexturesEdit

Virtual textures are textures that are allowed to be used as a template for other textures. This is useful in situations where textures vary by a small amount. In this case, the similarity can be put in a virtual texture, and the children need to only describe their differences.

Around Wikia's network

Random Wiki