WoW:XML/Layers: Difference between revisions

From AddOn Studio
< XML
Jump to navigation Jump to search
(Created page with "{{uixmlprop}} Layers holds a list of Layer elements, and is a fundamental UI building block for creating visible graphical elements for [[XML/Fra...")
 
m (Move page script moved page XML/Layers to XML/Layers without leaving a redirect)
 
(No difference)

Latest revision as of 04:49, 15 August 2023

XML UI ← XML properties < Layers

Layers holds a list of Layer elements, and is a fundamental UI building block for creating visible graphical elements for Frame UI elements. Layers can be defined on any Frame type elements, including Buttons and EditBoxes.

Inheritance[edit]

Inherited by: none, Inherits: none, Defined in: Frame

Elements[edit]

<Layer> ...

Attributes[edit]

none

Summary[edit]

Layers are the primary 'Drawing' mechanism in the WoW UI, and allow WoW to display all of its visible UI elements on the screen. Layers work by defining a list of <Layer> elements, each of which define a 'Z order' level, and define which LayoutFrames should be drawn at that 'level'. A layer works by listing Texture and FontString elements each of which can draw itself based on how its defined. The cumulative effect of all the Layers in the Layer list, combined with their FontString and Texture elements, will render the all the visible elements for a Frame at runtime.

Example[edit]

<Frame name="MyFrame">
  <Layers>
    <Layer>
      <Texture>
        <Size x="100" y="100" />
        <HitRectInsets>
          <AbsInset left="0" right="-100" top="0" bottom="0"/>
        </HitRectInsets>
        <Color a="1" r="1" g="1" b="1" />
      </Texture>
      <Texture>
        <Size x="100" y="100" />
        <Color a="1" r="1" g="1" b="1" />
      </Texture>
    </Layer>
  </Layers>
</Frame>

This example will show a frame with several textures.

Details[edit]