WoW:XML/Backdrop: Difference between revisions
< WoW:XML
Jump to navigation
Jump to search
m (Corrected spelling/grammar) |
m (Move page script moved page XML/Backdrop to WoW:XML/Backdrop without leaving a redirect) |
||
| (4 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
{{uixmltype}} | |||
== Inheritance == | |||
Inherited by: none, Inherits: none, Defined in: [[XML/Frame|Frame]] | |||
Elements | == Elements == | ||
* <[[XML/Inset|BackgroundInsets]]> - how far into the frame the background will be drawn (higher values are thicker edges) | |||
* <[[XML/Value|EdgeSize]]> - how large each copy of the edgeFile becomes on-screen (i.e. border thickness and corner size) | |||
* <[[XML/Value|TileSize]]> - how large each copy of the bgFile becomes on-screen | |||
* <[[XML/Color|Color]]> - defines a background color | |||
* <[[XML/Color|BorderColor]]> - defines a border color | |||
Attributes | == Attributes == | ||
* bgFile (string) - texture file for frame background (.blp or .tga format) | |||
* edgeFile (string) - Which texture file to use as frame edge (.blp or .tga format) | |||
* tile (bool) - true if background texture will be repeated as tiles, otherise is stretched, . Default is 'false'. | |||
* alphaMode ([[XML/ALPHAMODE|ALPHAMODE]]) - Type of blend if any used for the colors or texture. Default is 'BLEND'. | |||
== | == Xsd == | ||
: | <xs:sequence minOccurs="0"> | ||
<xs:choice maxOccurs="unbounded"> | |||
: | <xs:element name="BackgroundInsets" type="Inset"/> | ||
: | <xs:element name="TileSize" type="Value"/> | ||
: | <xs:element name="EdgeSize" type="Value"/> | ||
: | <xs:element name="Color" type="ColorType"/> | ||
<xs:element name="BorderColor" type="ColorType"/> | |||
</xs:choice> | |||
</xs:sequence> | |||
<xs:attribute name="bgFile" type="xs:string"/> | |||
<xs:attribute name="edgeFile" type="xs:string"/> | |||
<xs:attribute name="tile" type="xs:boolean" default="false"/> | |||
<xs:attribute name="alphaMode" type="ALPHAMODE" default="BLEND"/> | |||
== Example == | == Summary == | ||
<Frame name=" | Path examples | ||
* bgFile: 'Interface/DialogFrame/UI-DialogBox-Background', 'Interface/Tooltips/UI-Tooltip-Background' | |||
* edgeFile: 'Interface/Tooltips/UI-Tooltip-Border', 'Interface/DialogFrame/UI-DialogBox-Border' | |||
=== Example === | |||
<Frame name="MyFrame" parent="UIParent" toplevel="true" enableMouse="true" movable="true"> | |||
<Size x="200" y="200"/> | |||
<Anchors> | |||
<Anchor point="CENTER"/> | |||
<EdgeSize | </Anchors> | ||
<!-- Draw the main window --> | |||
<Backdrop bgFile="Interface\TutorialFrame\TutorialFrameBackground" | |||
<TileSize | edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true"> | ||
<EdgeSize val="16"/> | |||
<TileSize val="32"/> | |||
<BackgroundInsets left="5" right="5" top="5" bottom="5"/> | |||
</Backdrop> | |||
</Frame> | </Frame> | ||
[[File:Backdrop.jpg]] | |||
[[Category:Interface customization]] | [[Category:Interface customization]] | ||
Latest revision as of 04:49, 15 August 2023
← XML UI ← XML types < Backdrop
Inheritance
Inherited by: none, Inherits: none, Defined in: Frame
Elements
- <BackgroundInsets> - how far into the frame the background will be drawn (higher values are thicker edges)
- <EdgeSize> - how large each copy of the edgeFile becomes on-screen (i.e. border thickness and corner size)
- <TileSize> - how large each copy of the bgFile becomes on-screen
- <Color> - defines a background color
- <BorderColor> - defines a border color
Attributes
- bgFile (string) - texture file for frame background (.blp or .tga format)
- edgeFile (string) - Which texture file to use as frame edge (.blp or .tga format)
- tile (bool) - true if background texture will be repeated as tiles, otherise is stretched, . Default is 'false'.
- alphaMode (ALPHAMODE) - Type of blend if any used for the colors or texture. Default is 'BLEND'.
Xsd
<xs:sequence minOccurs="0">
<xs:choice maxOccurs="unbounded">
<xs:element name="BackgroundInsets" type="Inset"/>
<xs:element name="TileSize" type="Value"/>
<xs:element name="EdgeSize" type="Value"/>
<xs:element name="Color" type="ColorType"/>
<xs:element name="BorderColor" type="ColorType"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="bgFile" type="xs:string"/>
<xs:attribute name="edgeFile" type="xs:string"/>
<xs:attribute name="tile" type="xs:boolean" default="false"/>
<xs:attribute name="alphaMode" type="ALPHAMODE" default="BLEND"/>
Summary
Path examples
- bgFile: 'Interface/DialogFrame/UI-DialogBox-Background', 'Interface/Tooltips/UI-Tooltip-Background'
- edgeFile: 'Interface/Tooltips/UI-Tooltip-Border', 'Interface/DialogFrame/UI-DialogBox-Border'
Example
<Frame name="MyFrame" parent="UIParent" toplevel="true" enableMouse="true" movable="true">
<Size x="200" y="200"/>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Backdrop bgFile="Interface\TutorialFrame\TutorialFrameBackground"
edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<EdgeSize val="16"/>
<TileSize val="32"/>
<BackgroundInsets left="5" right="5" top="5" bottom="5"/>
</Backdrop>
</Frame>
