Fandom

World of Warcraft Wiki

XML attributes

10 756pages on
this wiki
Add New Page
Comments0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

XML UI

WoW XML attributes and other elements that can be applied to XML elements. These describe the actual XML attributes for WoW XML elements and should not be confused with the actual WoW XML type of Attribute or Attributes .

Strictly speaking as far as XML goes, attributes are inline properties of an element, like so: <element attribute="value"/>. Elements are however properties that are grouped inside the element tag as children, like so: <element><element attribute="value"/></element>. An element's properties are either the attributes, or 'child elements' of that element. The title of this page is 'XML attributes', but it should have been called 'XML properties', as its intent is to document in one place some of the properties, especially the common ones, like <Size> or 'name'. There are also Types, which are the kind of thing a property is. Keep this in mind, and towards this, this page is broken down into two major sections.

Types for properties Edit

  • 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

Attributes Edit

alpha (float) Edit

Elements can be transparent and this property used to define it.

  • 0 - full transparent
  • 1 - solid (default)

alphaMode (ALPHAMODE) Edit

Defines a way transparency applied:

  • DISABLE - no transparency.
  • BLEND - while background fades element gets stronger (default)
  • ADD - background and element colors added resulting in too bright colors
  • APLHAKEY - transparency depends on alpha channel of textures
  • MOD - Not tested

autoFocus (bool) Edit

Automatically place the cursor bar inside a text box and receive all of the keyboard's attention. Default is 'true'.

blinkSpeed (float) Edit

. Default is '0.5'.

bytes (int) Edit

checked (bool) Edit

If set to true - CheckButton is checked when loaded. Default is false

clampedToScreen (bool) Edit

Prohibits element to go out of screen. Way applied unknown, probably just moved.

defaultvalue Edit

displayduration Edit

drawlayer Edit

enableKeyboard (bool) Edit

Tell the frame to receive keyboard input.

enableMouse (bool) Edit

Tell the frame to receive mouse input.

file (string) Edit

This refers to a file used by element, path is relative to scheme path: if addon is in "MyAddon" folder file specified "myfile.lua" will be searched in this folder (i guess only, needs testing). "\\Interface\\Wherever" seems to be the same as "Interface\\Wherever" ("C:\\{{WoW}}\\Interface\\Wherever").

font (string) Edit

frameStrata Edit

hidden (bool) Edit

If true element is skipped in drawing resulting it not appearing on screen (interactions also skipped). Default false.

historyLines (int) Edit

password (bool) Edit

Determines if text should be viewed using hidden 'password' format.

id (int) Edit

Number of element. Used for same looking element to make difference between them (much easier than by names)

ignoreArrows (bool) Edit

Text fields will ignore directional arrows and move the character instead. (Holding <Alt> temporarily sets this to true). Default false.

countInvisibleLetters (bool) Edit

inherits (Element) Edit

Name of element to take properties from. Element must be marked with "virtual=true" attribute (not tested otherwise). For some reason it's allowed to inherit elements of different types. In that case properties are copied, and unused ones are ignored(need to be tested too). You can define more that one template to use:

<Button inherits="OneTemplate, TwoTemplate">
Properties will be taken first from "OneTemplate" and then "TwoTemplate" so if they have the same properties from second will be taken.

insertmode Edit

Tells a MessageFrame where to put new content. Accepts "TOP" or "BOTTOM". Default "TOP"

justifyH Edit

Align text "LEFT", "RIGHT", or "CENTER".

justifyV Edit

Align text "TOP", "BOTTOM", or "MIDDLE".

letters Edit

Defines the maximum characters to allow in a text box.

multiLine (bool) Edit

Tells a text box to span multiple lines (<Enter> inserts a line break).

maxLines Edit

Defines the maximum number of lines to allow in a text box.

maxvalue (float) Edit

Defines the highest numeric value a widget will accept.

minimaparrowmodel Edit

minimapplayermodel Edit

minvalue (float) Edit

Defines the lowest numeric value a widget will accept.

monochrome Edit

movable (bool) Edit

(De)Activates the methods, :StartMoving() and :StopMovingOrSizing(). Default false.

name (string) Edit

This string represents name of an element for scripting. Frames defined via XML must be named if they are to be accessed by scripts, but for showing up in interface unnamed are ok. Names are case sensitive - means "MyElement" not same as "myelement". See: LayoutFrame

parentKey Edit

Name of Lua object reference to set in the parent, to this elements Lua object at runtime. in LayoutFrame, AnimationGroup, Animation.

parentArray Edit

Array name in the parent frame to add this LayoutFrame. in LayoutFrame.

nonspacewrap Edit

Don't wrap text when it gets to the end of the parent frame.

numeric Edit

Tells the text box to accept only numeric values.

orientation Edit

relativeTo Edit

Name of an element to make this element relative to. in Anchor

relativeKey Edit

Name of an 'parentKey' or other object refernce to make this element relative to. in Anchor

outline Edit

parent (Element) Edit

You can define another parent for an element. To make button around minimap you can move it inside minimap frame that way. I'm not sure do element really removed from this one, or it just defines drawing order. If skipped then parent is container of element

protected (bool) Edit

Can be defined only in blizzard interface files (At least no one checked yet). If set to true some special api functions can be used. Any element inherited from protected ones can use this functions too. Protected functions/actions cannot be circumvented with this attribute.

resizable (bool) Edit

If true element can be resized. Default false

reverse Edit

scale (float) Edit

Sets the scale. Default is the parent's scale. Accepts values greater than and not equal to 0.

setAllPoints (bool) Edit

Attaches all four corners to the parent's inner corners.

text (string) Edit

Used to define text to show on buttons, fontstrings etc.

target Edit

Name of an element to use as this elements target. in Animation.

targetKey Edit

Name of a parentKey object refernce to use as this elements target. in Animation.

toplevel Edit

valuestep (float) Edit

Tells a slider how far to jump per click.

virtual (bool) Edit

If true element will not created, but used as template for other elements. Default false

Elements Edit

Size (Dimension) Edit

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.

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.

TitleRegion (LayoutFrame) Edit

Adds a region used for automatically dragging a frame.

ResizeBounds Edit

Define how big or small this frame can possibly be.

Backdrop Edit

Provides a background for a frame.

HitRectInsets (Inset) Edit

Alters the user input hit box for a frame.

Layers Edit

This is a place where actually defined what will be drawn on screen. If this tag omitted default representation is taken (this needs to be tested). 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.

Attributes Edit

A list of Attributes that add members to the Lua object for the element.

Frames Edit

Inside this tag all child elements are located. So if you want button inside a frame you need put it inside this tag of frame.

Scripts Edit

This tag only accepts Category:Widget event handlers.

Still for some elements there is extra tags where elements can be placed. This depends completely on element type

TexCoords Edit

Determines how much of the specified texture is to be shown. There are four specifications: "left", "right", "top", and "bottom". Each one specifies the coordinates of what the image should show, using a scale value. IE: With left=0 and right=1, it would show all the pixels from the left side to the right, or 100% of the image's width.

<TexCoords left="0" right="0.5" top="0" bottom="0.5" />

This example shows only the top left quarter of the texture.

Color Edit

Gradient Edit

FontString Edit

FontHeight (Value) Edit

Shadow Edit

Puts a shadow behind an element.

barcolor Edit

bartexture Edit

buttontext Edit

checkedtexture Edit

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.

highlightfont Edit

Mouseover font.

highlighttexture Edit

Mouseover texture.

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.

scrollchild Edit

ThumbTexture Edit

Also on Fandom

Random Wiki