WoW:XML properties: Difference between revisions
(3 intermediate revisions by 2 users not shown) | |||
Line 146: | Line 146: | ||
=== [[XML/Scripts|Scripts]] === | === [[XML/Scripts|Scripts]] === | ||
This element accepts specific script handler elements of a [[XML/Script|Script]] type. See [[Category:Widget event handlers| | This element accepts specific script handler elements of a [[XML/Script|Script]] type. See the [[:Category:Widget event handlers|widget event handlers category]] for more detail on individual handler semantics, and [[Widget handlers]] for which element types use handlers. | ||
Script types: | Script types: | ||
* OnLoad | * OnLoad | ||
Line 152: | Line 152: | ||
* OnSizeChanged | * OnSizeChanged | ||
* OnEvent | * OnEvent | ||
* OnUpdate | * OnUpdate(self, elapsed) | ||
* OnShow | * OnShow | ||
* OnHide | * OnHide |
Latest revision as of 00:46, 7 October 2023
← XML UI
FrameXML XML properties, as used here are common complex XML elements, used to help define major Ui XML elements for creating WoW UI frames and widgets. See also XML elements, XML attributes, and XML types.
Summary[edit]
A particular element is defined by both its attributes, and by any 'child elements' it may have. These along with attributes, all together make up the definition major XML Ui elements, like widgets.
In XML, 'attributes' are the in-line properties of an 'element', like:
<element attribute="value"/>
Each 'element' may also contain its own child elements, like:
<element> <element attribute="value"/> <element attribute="value"/> </element>
The intent for this reference is to document all of the actual common complex properties, like '<Size>' or '<Anchor>', for major elements that are not regular attributes. A standard FrameXML XML property use to define a size of 100 x 100 looks like:
<Size> <AbsDimension x="100" y="100" /> </Size>
Properties are usually defined in a standard order in a major element, like <Size>' must come before '<Anchors>', or it may not work correctly.
Major Ui elements are almost never placed directly inside another major Ui element, but inside list properties like '<Frames>'. Each major element only uses a subset of the properties below, like '<Font>' does not use '<Scripts>', like.
<Frame> <Size> <-- FrameXML standard property not in a list <AbsDimension x="100" y="100" /> </Size> <Frames> <Frame> <-- major FrameXML element in a list ... </Frame> </Frames> <Scripts> <Script ... /> <-- major FrameXML element in a list </Scripts> </Frame>
Reference[edit]
Below lists in alphabetical order the common complex property definitions, as used by the major Ui XML elements.
Key for attributes types (see XML types):
- string - String, just some text
- int - Integer, number (0,1,2,3,4,5...)
- float - Single, number with point (0.3 or 1.65 etc)
- bool - Boolean, one of '0', '1', 'true', 'false' to indicate enable or disable, or on or off, etc...
- enum - List, an enumeration, or one of a set of predefined values
- [Element] - Element Type, name of element
Anchors[edit]
A list of Anchors that defines position of element relative to its parent position.
Animations[edit]
A list of AnimationGroups that define arbitrary animations for a target element.
Attribute[edit]
Elements of the Attributes property that add internal flags to UI objects, often used to denote secure frames.
- name (string) - Lua name for the member
- type (ATTRIBUTETYPE) - the Lua type for the member. Default is 'string'.
- value - value to set for the member
Attributes[edit]
A list of Attributes that define internal options for elements, often used for secure frames.
Backdrop[edit]
Provides a background for a frame.
BarColor[edit]
BarTexture[edit]
ButtonText[edit]
CheckedTexture[edit]
Color[edit]
Generally represents a font text, foreground, or fill color
ColorValueTexture[edit]
ColorValueThumbTexture[edit]
ColorWheelTexture[edit]
ColorWheelThumbTexture[edit]
DisabledCheckedTexture[edit]
Define the texture to use when a check button is checked.
DisabledFont[edit]
Define the font to use when a button is disabled.
DisabledTexture[edit]
Define the texture to use when a button is disabled.
FontHeight[edit]
(Value) -
FontString[edit]
(FontString) -
Frames[edit]
Contains the set of child frames of a Frame type. If you want button inside a frame you need put it inside this tag of frame.
Gradient[edit]
(Gradient) - defines gradation of color blended with Color or texture File. currenly is only a property of Texture.
HighlightFont[edit]
Mouseover font.
HighlightTexture[edit]
Mouseover texture.
HitRectInsets[edit]
(Inset) - Alters the user input hit box for a frame.
KeyValue[edit]
Contained by the KeyValues property, and set Lua values at run time.
- key - Lua key, usually a name, for the member
- value - value to set for the member
- keyType (KEYVALUETYPE) - the Lua type for the member key. Default is 'string'.
- type (KEYVALUETYPE) - the Lua type for the member value. Default is 'string'.
KeyValues[edit]
- KeyValue ...
Layer[edit]
Placed inside the Layers property, and contains a list of <FontString> and <Texture> elements, which define what will actually be drawn on screen. Only <FontString> and <Texture> elements are allowed inside Layer element.
Layers[edit]
Contains a Layer list. Layers and Layer define what will actually be drawn on screen. Only 'Layer' elements can be inside this tag, each have 'level' property to define the order they will be drawn. Only <FontString> and <Texture> elements are allowed inside Layer element.
NormalFont[edit]
NormalTexture[edit]
PushedTextOffset[edit]
Text moves when clicked (and held), this defines how far it moves. Text moves back to its previous location when the mouse button is released.
PushedTexture[edit]
Change the texture to this when clicked (and held). The texture changes back to its texture when the mouse button is released.
ResizeBounds[edit]
Defines how big or small this frame can possibly be.
- minResize (Dimension) - lower bounds of a frames size
- maxResize (Dimension) - upper bounds of a frames size
Script[edit]
Lua script handler defined inside a Scripts element.
Scripts[edit]
This element accepts specific script handler elements of a Script type. See the widget event handlers category for more detail on individual handler semantics, and Widget handlers for which element types use handlers. Script types:
- OnLoad
- OnAttributeChanged
- OnSizeChanged
- OnEvent
- OnUpdate(self, elapsed)
- OnShow
- OnHide
- OnEnter
- OnLeave
- OnMouseDown
- OnMouseUp
- OnMouseWheel
- OnJoystickStickMotion
- OnJoystickAxisMotion
- OnJoystickButtonDown
- OnJoystickButtonUp
- OnJoystickHatMotion
- OnDragStart
- OnDragStop
- OnReceiveDrag
- PreClick
- OnClick
- PostClick
- OnDoubleClick
- OnValueChanged
- OnMinMaxChanged
- OnUpdateModel
- OnAnimFinished
- OnEnterPressed
- OnEscapePressed
- OnSpacePressed
- OnTabPressed
- OnTextChanged
- OnTextSet
- OnCursorChanged
- OnInputLanguageChanged
- OnEditFocusGained
- OnEditFocusLost
- OnHorizontalScroll
- OnVerticalScroll
- OnScrollRangeChanged
- OnCharComposition
- OnChar
- OnKeyDown
- OnKeyUp
- OnColorSelect
- OnHyperlinkEnter
- OnHyperlinkLeave
- OnHyperlinkClick
- OnMessageScrollChanged
- OnMovieFinished
- OnMovieShowSubtitle
- OnMovieHideSubtitle
- OnTooltipSetDefaultAnchor
- OnTooltipCleared
- OnTooltipAddMoney
- OnTooltipSetUnit
- OnTooltipSetItem
- OnTooltipSetSpell
- OnTooltipSetQuest
- OnTooltipSetAchievement
- OnEnable
- OnDisable
- OnArrowPressed
- OnExternalLink
- OnButtonUpdate
- OnError
ScrollChild[edit]
Shadow[edit]
(Shadow) - Puts a shadow behind an element.
Size[edit]
(Dimension) - Defines a size of an element. Normally this is done by putting "AbsDimension" tag inside with "x" and "y" attributes, but sometimes this is done by just giving "x" and "y" attributes to "Size" tag itself. Last one is probably old way of defining and left for a backward compatibility.
ThumbTexture[edit]
TexCoords[edit]
Determines how much of the specified texture is to be shown.
TitleRegion[edit]
(LayoutFrame) - Adds a region used for automatically dragging a frame.