WoW:XML/BackdropTemplate

From AddOn Studio
< XML
Revision as of 02:07, 29 July 2022 by Bear (talk | contribs)
Jump to navigation Jump to search

XML UI ← XML templates < BackdropTemplate

BackdropTemplate is a template that helps create a Frame backdrop in the WoW UI.

Inheritance

Inherited by: many, Inherits: none, Defined in: SharedXML

Requirements

  • a XML/Frame that inherits or indirectly inherits 'BackdropTemplate'
<Frame name="Frame1" inherits="BackdropTemplate">
  • XML/KeyValue with a Key of 'backdropInfo' and type of 'global' who's value is the name of a global variable that holds the desired backdrop layout.
<KeyValues>
	<KeyValue key="backdropInfo" value="BACKDROP_DIALOG_32_32" type="global" />
</KeyValues>

Configuration

KeyValue pairs on the Frame:

  • backdropInfo (global, value to table name) - points to a backdrop configuration table, using 'type' 'global' with a string 'value' that's the name of a global Lua table
  • backdropColorAlpha (number) - 0 to 1 value that can be used to override BackdropTemplateMixin:SetBackdropColor(r, g, b, a) alpha, set on load
  • backdropBorderColorAlpha (number) - 0 to 1 value that can be used to override the BackdropTemplateMixin:SetBackdropBorderColor(r, g, b, a) alpha, set on load
  • backdropBorderBlendMode (string) - can be used to override the BackdropTemplateMixin:SetBorderBlendMode(blendMode), set on load, which will set the blend mode for each layout frame piece that makes up the backdrop. See XML/ALPHAMODE for list of options

Notes

  • The BackdropTemplate template directly replaced the older XML/Backdrop type in WoW Retail patch 9.0.1, but still worked in Classic and Era.
  • In Classic and Classic Era patch 2.5.3 and patch 1.14.0 respectively, BackdropTemplate template also replaced Backdrop element, when the version 9 engine was adopted.