Lore archive · Warcraft Wiki, 2023 dump
BackdropTemplate
Last wiki revision 2022-11-12
A backdrop is a set of background and border textures created with BackdropTemplate or BackdropTemplateMixin.
- Adding a new backdrop
- Create a Frame that inherits.
- Prepare a table, or choose an existing one from.
- Apply the table in Lua using ; or in XML using tags.
- Changing the backdrop
- Change the by calling and.
- Change the other properties by calling with a new table (silently fails if its the same table, despite any changes).
- Remove a backdrop by calling without args
- Alternatives
- Instead of, save the table as and call ApplyBackdrop.
- Instead of, call ClearBackdrop
- Instead of creating a new Frame, BackdropTemplateMixin or custom textures.
When applied to any Frame, BackdropTemplateMixin adds the following API:
- ApplyBackdrop - Applies the backdrop currently saved as.
- ClearBackdrop - Hides the current background and border textures.
- SetBackdrop( backdropInfo ) - Saves the table to and calls ApplyBackdrop, or calls ClearBackdrop if the argument is nil.
- GetBackdrop : table - Returns a copy of.
- GetBackdropColor : r, g, b, a - Returns the background.
- GetBackdropBorderColor : r, g, b, a - Returns the border color.
- SetBackdropColor( r, g, b [, a] ) - Returns the background.
- SetBackdropBorderColor( : r, g, b [, a] ) - Returns the border color.
The following methods also exist, but should not need to be called as they are registered via BackdropTemplate:
- OnBackdropLoaded - handler to apply a background if it was set in XML using tags.
- OnBackdropSizeChanged - handler to update the textures.
Creating a Frame in Lua and calling SetBackdrop
Creating a Frame in Lua and calling ApplyBackdrop
Creating a Frame in XML with KeyValue tags
Source
https://warcraft.wiki.gg/wiki/BackdropTemplate · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.