WoW:XML/BackdropTemplate: Difference between revisions

Line 21: Line 21:


== Configuration ==
== Configuration ==
; KeyValue pairs:
=== KeyValue pairs ===
''on the Frame inheriting BackdropTemplate''
''on the Frame inheriting BackdropTemplate''
* backdropInfo (global, backdropInfo table name) - the main backdrop configuration table, using 'type' 'global' with a string 'value' that's the name of a global Lua 'backdropInfo' table. Can use one of the many WoW predefined 'backdropInfo' default tables, like BACKDROP_DIALOG_32_32.
* backdropInfo (global, backdropInfo table name) - the main backdrop configuration table, using 'type' 'global' with a string 'value' that's the name of a global Lua 'backdropInfo' table. Can use one of the many WoW predefined 'backdropInfo' default tables, like BACKDROP_DIALOG_32_32.
Line 45: Line 45:
</pre>
</pre>


; 'backdropInfo' table options:
=== 'backdropInfo' table options ===
''which must be defined outside of FrameXML in Lua''
''which must be defined outside of FrameXML in Lua''
* bgFile (string) - the resource path to the backdrop background texture
* bgFile (string) - the resource path to the backdrop background texture
Line 62: Line 62:
** left (number) - bottom edge inset amount toward the top
** left (number) - bottom edge inset amount toward the top


backdropInfo requirements:
=== notes ===
; backdropInfo requirements:
* The backdropInfo table requires one, or both, of 'edgeFile' or 'bgFile', or will be ignored, and the backdrop will not be created.
* 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:
; 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.
* '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>
<pre>