Wikia

WoWWiki

XML/Value

Talk0
101,311pages on
this wiki

< XML

XML UI ← XML types < Value

Value is a type used for a variety of purposes for defining single numerical values relating to size or position. See Dimension for numerical value pairs use type. Value is used for properties such as FontHeight and TileSize.

Inheritance Edit

Inherited by: none, Inherits: none, Defined in: Backdrop,FontString

Elements Edit

  • <AbsValue> - defines a relative or absolute value, using 'absolute' unit based coordinates
  • <RelValue> - defines a relative or absolute value, using 'relative' scalar coordinates

Attributes Edit

  • val (int) - defines a numerical unit based value

Summary Edit

Value based elements facilitate the 'Layout' mechanism in the WoW UI. Value works by providing a flexible set of constructs by using one of: inline values (val), the AbsValue element, or the RelValue element.

Example Edit

<Frame name="MyFrame">
  <Size x="200" y="200"/>
  <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background"
         edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
    <BackgroundInsets>
      <AbsInset left="11" right="12" top="12" bottom="11"/>
    </BackgroundInsets>
    <TileSize val="32"/>
    <EdgeSize val="32"/>
  </Backdrop>
  <Layers>
    <Layer>
      <FontString text="Bob" inherits="MyFont">
        <Size x="100" y="100"/>
        <FontHeight>
          <AbsValue val="12"/>
        </FontHeight>
        <Anchors>
          <Anchor point="TOP"/>
        </Anchors>
      </FontString>
    </Layer>
  </Layers>
</Frame>

This example demonstrates use of FontHeight using Abs, and TileSize and EdgeSize using inline values.

Details Edit

Around Wikia's network

Random Wiki