SC2Mapster Wiki
Advertisement

Frame Object[ | ]

Frame[ | ]

Description[ | ]

A UI Frame consists of 4 parts in the following format <Frame type="FrameType" name="Framename" template="FrameTemplateParent/FrameTemplate" file="GameUI"> </Frame>.

The first 2 parts of a Frame declaration are mandatory and determine what properties the frame has, as well as providing a handle to refer the frame when it's created within the SC2 Engine.

The last 2 parts are optional declarations, but are used when copying a previously created frame, or when referring to frames outside the current file respectively.

Frame Type Structure and Element Support List

Options[ | ]

Type

The type of this UI frame the determines the inherited properties of the frame as well as what content tags are allowed and applied on it.

List of Frame Types

Name

The name of this UI frame, this creates an local variable within the frame's file (when editing), and within the frame's parent (when run in the engine) with the frame's name allowing references to it both within the file and through triggers.

Template

  • template="TemplateLayoutFile/PathToTemplate"
  • Only works for new frames
  • The optional value if the contents is partially listed at another location, this way you don't have to create the same object over and over if most of the values stay the same.

File

The file in which the item referred to lies, most blizzard UI items files are instead referred to by the value "GameUI".

Usage[ | ]

<Frame type="Frame" name="MyFrame"/>

   <Frame type="CommandTooltip" name="MyTooltip" template="CommandButton/CommandTooltipTemplate"/>
</Frame>
<Frame type="MinimapPanel" name="GameUI/UIContainer/ConsoleUIContainer/MinimapPanel" file="GameUI"/>
</Frame>
<Frame type="Image" name="BackgroundImage"> <Anchor side="Top" relative="$parent" pos="Min" offset="0"/> <Anchor side="Bottom" relative="$parent" pos="Max" offset="0"/> <Anchor side="Left" relative="$parent" pos="Min" offset="0"/> <Anchor side="Right" relative="$parent" pos="Max" offset="0"/> <Texture val="@@UI/TriggerDialogFrameBackground"/> <TextureType val="Border"/> <Tiled val="true"/> </Frame>

</Frame>


Advertisement