WoW:XML/Value
< XML
Jump to navigation
Jump to search
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.