WoW:XML/BackdropTemplate: Difference between revisions

Line 62: Line 62:
** left (number) - bottom edge inset amount toward the top
** left (number) - bottom edge inset amount toward the top


The backdropInfo table requires one, or both, of 'edgeFile' or 'bgFile', or will be ignored, and the backdrop will not be created.
backdropInfo requirements:
* The backdropInfo table requires one, or both, of 'edgeFile' or 'bgFile', or will be ignored, and the backdrop will not be created.
 
user defined color table requirements:
* 'color table', or color constant, must be created with CreateColor(r, g, b, a) which creates a ColorMixin instance. BackdropTemplate will try to call GetRGB on the table and expect an 'r, g, b, a =' return.
<pre>
PAPER_FRAME_DARK_COLOR = CreateColor(0.25, 0.1484375, 0.02);
<pre/>
* The color constant must be created before the Frame loads, so must be created before the file XML is loaded in Lua, just like the 'backdropInfo' does.


== Notes ==
== Notes ==
* The BackdropTemplate template directly replaced the older [[XML/Backdrop]] [[XML types|type]] in WoW Retail patch 9.0.1, but still worked in Classic and Era.
* The BackdropTemplate template directly replaced the older [[XML/Backdrop]] [[XML types|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.
* 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.