Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:XML/BackdropTemplate
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{uixmltemp}} [[XML/BackdropTemplate|BackdropTemplate]] is a [[XML templates|template]] that helps create a Frame backdrop in the WoW UI. See also the old style [[XML/Backdrop]] element. == Inheritance == Inherited by: many, Inherits: none, Defined in: [[XML/SharedXML|SharedXML]] == Requirements == * a [[XML/Frame]] that inherits or indirectly inherits 'BackdropTemplate' <pre> <Frame name="Frame1" inherits="BackdropTemplate"> </pre> * [[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. <pre> <KeyValues> <KeyValue key="backdropInfo" value="BACKDROP_DIALOG_32_32" type="global" /> </KeyValues> </pre> == Example == <pre> <Frame name="MyFrame" inherits="BackdropTemplate"> <KeyValues> <KeyValue key="backdropInfo" value="BACKDROP_DIALOG_32_32" type="global" /> </KeyValues> </Frame> </pre> This example loads a Frame named MyFrame with a simple BackdropTemplate style backdrop. == Configuration == === KeyValue pairs === ''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. <pre> <KeyValue key="backdropInfo" value="BACKDROP_DIALOG_32_32" type="global" /> </pre> * backdropColor (global, color table name) - global RGB color constant. default 1, 1, 1. Used to set backdrop background vertex color values, set on load by BackdropTemplate SetBackdropColor(r, g, b, a) which uses SetVertexColor(r, g, b, a or 1) on the background texture, if any. If no background texture is defined, then has no effect. * backdropColorAlpha (number) - 0 to 1. default 1. used to override alpha for the backdrop background texture, set on load by BackdropTemplate SetBackdropColor(r, g, b, a) which uses SetVertexColor(r, g, b, a or 1) on the background texture, if any. If no background texture is defined, then has no effect. <pre> <KeyValue key="backdropColor" value="BLACK_FONT_COLOR" type="global"/> <KeyValue key="backdropColorAlpha" value="0.9" type="number"/> </pre> * backdropBorderColor (global, color table name) - global RGB color constant. default 1, 1, 1. Used to set backdrop border vertex color values, set on load by BackdropTemplate SetBackdropBorderColor(r, g, b, a) which uses SetVertexColor(r, g, b, a or 1) on the edge textures, if any. If no edge texture is defined, then has no effect. * backdropBorderColorAlpha (number) - 0 to 1. default 1. used to override alpha for the backdrop border texture, set on load by BackdropTemplate SetBackdropBorderColor(r, g, b, a) which uses SetVertexColor(r, g, b, a or 1) on the edge textures, if any. If no edge texture is defined, then has no effect. <pre> <KeyValue key="backdropBorderColor" value="ACHIEVEMENT_RED_BORDER_COLOR" type="global"/> <KeyValue key="backdropBorderColorAlpha" value="0.5" type="number"/> </pre> * backdropBorderBlendMode (string) - overrides the blend/alpha mode for the 8 backdrop edge pieces, set on load by BackdropTemplate SetBorderBlendMode(blendMode) which uses SetBlendMode(blendMode) on each edge piece. See [[XML/ALPHAMODE]] for list of options. <pre> <KeyValue key="backdropInfo" value="BACKDROP_CALLOUT_GLOW_0_20" type="global"/> <KeyValue key="backdropBorderBlendMode" value="ADD" type="string"/> </pre> === 'backdropInfo' table options === ''which must be defined outside of FrameXML in Lua'' * bgFile (string) - the resource path to the backdrop background texture * edgeFile (string) - the resource path to the backdrop edge texture * tile (boolean) - if background is tiled, true to tile * tileEdge (boolean) - if the top, bottom, right, left edge texture components are tiled, true to tile * tileSize (number) - default is 32. the size of section of the texture to use for the background when tiled, starting at x,y 0,0 to a width and height of 'tileSize'. the top rendered row will repeat the tiled portion of the texture, while the remainder of the background will only use the bottom row of pixels of the tile, to repeat as tiles to the bottom of the background area. * edgeSize (number) - default is 32. width and height of texture source and drawn edge pieces * insets (table) - the edge and background rendering offsets relative to the natural bounding box of the frame. like, 'insets = { left = 3, right = 5, top = 3, bottom = 5 },' ** left (number) - left edge inset amount toward the right ** right (number) - right edge inset amount toward the left ** top (number) - top edge inset amount toward the bottom ** left (number) - bottom edge inset amount toward the top === config details === User defined 'backdropInfo' requirements: * The backdropInfo table requires one, or both, of 'edgeFile' or 'bgFile', or will be ignored, and the backdrop will not be created. <pre> BACKDROP_DIALOG_32_32 = { bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background", edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", tile = true, tileEdge = true, tileSize = 32, edgeSize = 32, insets = { left = 11, right = 12, top = 12, bottom = 11 }, }; </pre> * If using a user created backdropInfo table, it must be created before the Frame loads, so must be created in Lua in a lua file that loads first, before the file XML is loaded. User defined color table requirements: * A '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 expects an 'r, g, b =' return. <pre lang='lua'> PURE_RED_COLOR = CreateColor(0.8, 0, 0); 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 == * 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. With this patch the old-style [[XML/Backdrop]] element no longer worked in retail. * 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. With this patch the old-style Backdrop element no longer worked in any version of WoW. == See also == * [[XML/Backdrop]]
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Tocright
(
edit
)
Template:Uixmltemp
(
edit
)