WoW:XML/Backdrop: Difference between revisions

From AddOn Studio
< XML
Jump to navigation Jump to search
m (catfix)
m (Move page script moved page XML/Backdrop to XML/Backdrop without leaving a redirect)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Backdrop ==
{{uixmltype}}


Derived from: ?
== Inheritance ==
Inherited by: none, Inherits: none, Defined in: [[XML/Frame|Frame]]


Elements: EdgeSize, TileSize, BackgroundInsets
== 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: bgFile, edgeFile, tile
== 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'.


== Description ==
== Xsd ==
:;bgFile: Which texture file to use as frame background (.blp or .tga format)<br>Examples: "Interface/DialogFrame/UI-DialogBox-Background", "Interface/Tooltips/UI-Tooltip-Background"
<xs:sequence minOccurs="0">
:;[[edgeFiles|edgeFile]]: Which texture file to use as frame edge blp or .tga format)<br>Examples: "Interface/Tooltips/UI-Tooltip-Border", "Interface/DialogFrame/UI-DialogBox-Border"
  <xs:choice maxOccurs="unbounded">
:;tile: Determines if the background texture will be stretched all over the Backdrop area, or repeated in a form of tiles.
    <xs:element name="BackgroundInsets" type="Inset"/>
:;TileSize: Control how large each copy of the bgFile becomes on-screen
    <xs:element name="TileSize" type="Value"/>
:;EdgeSize: Control how large each copy of the edgeFile becomes on-screen (i.e. border thickness and corner size)
    <xs:element name="EdgeSize" type="Value"/>
:;BackgroundInsets:4 x Number - Controls how far into the frame the background will be drawn (use higher values the thicker the edges are)
    <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="autoInviteMainConfigFrame" frameStrata="HIGH" toplevel="true" enableMouse="true" movable="true" parent="UIParent">
Path examples
<Size>
* bgFile: 'Interface/DialogFrame/UI-DialogBox-Background', 'Interface/Tooltips/UI-Tooltip-Background'
<RelDimension x="0.3" y="0.3"/>
* edgeFile: 'Interface/Tooltips/UI-Tooltip-Border', 'Interface/DialogFrame/UI-DialogBox-Border'
</Size>
 
<Anchors>
=== Example ===
<Anchor point="CENTER"/>
  <Frame name="MyFrame" parent="UIParent" toplevel="true" enableMouse="true" movable="true">
</Anchors>
    <Size x="200" y="200"/>
<!-- Draw the main window -->
    <Anchors>
  <Backdrop bgFile="Interface\TutorialFrame\TutorialFrameBackground" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
        <Anchor point="CENTER"/>
  <EdgeSize>
    </Anchors>
<AbsValue val="16"/>
    <!-- Draw the main window -->
</EdgeSize>
    <Backdrop bgFile="Interface\TutorialFrame\TutorialFrameBackground"
  <TileSize>
        edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<AbsValue val="32"/>
  <EdgeSize val="16"/>
</TileSize>
  <TileSize val="32"/>
<BackgroundInsets>
  <BackgroundInsets left="5" right="5" top="5" bottom="5"/>
<AbsInset left="5" right="5" top="5" bottom="5"/>
    </Backdrop>
</BackgroundInsets>
  </Backdrop>
  </Frame>
  </Frame>
[[Image:Backdrop.jpg]]


[[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>

Backdrop.jpg