Documentation / XML guide
Layering
Strata, frame levels, draw layers and sublevels: what draws on top of what.
- What decides what is on top
- Strata
- Frame levels
- Draw layers inside a frame
- Frames at the same level share their layers
What decides what is on top
When two things overlap, which one is on top? Not the order they appear in the file. Every frame has a strata and a level, and everything a frame draws sits in a draw layer. Lizzard sorts by those, in a fixed order.
Strata
UI.xsd.
Measured (Retail) that a new frame with no parent is MEDIUM.
Guessed that the game draws them in exactly the list's order.frameStrata="DIALOG"on an element also moves the frames its templates already made, if they had the frame's old strata; one with a strata of its own keeps it. Without this, a dropdown menu's buttons stayed under the menu and took its clicks. Measured (Retail)
Frame levels
frameLevel="10"is the frame's own level, not one added to its parent's. Measured (Retail)frameLevelanduseParentLevel="true"move the frames the element's templates already made by the same amount, asSetFrameLeveldoes. Measured (Retail), from a capture of the game's action buttons.toplevel="true"marks a window that should come to the front. The flag is kept, and showing the frame doesn't change its level. Measured (Retail) Lizzard brings it to the front when it is clicked. Guessed
Draw layers inside a frame
One frame, four layers
<Frame name="MyBar" parent="UIParent" frameStrata="HIGH" frameLevel="5">
<Layers>
<Layer level="BACKGROUND">
<Texture parentKey="Bg"/>
</Layer>
<Layer level="ARTWORK" textureSubLevel="2">
<Texture parentKey="Fill"/>
</Layer>
<Layer level="OVERLAY">
<FontString parentKey="Label" inherits="GameFontNormal"/>
</Layer>
<Layer level="HIGHLIGHT">
<Texture parentKey="Glow"/>
</Layer>
</Layers>
</Frame>
- A
<Layer>with nolevelis ARTWORK, with notextureSubLevel0, asUI.xsdsays. Measured (Retail) for textures made in Lua. - Font strings over textures in the same layer: in Forever's Professions window a skill bar's name shows over its fill, though the fill has the higher sublevel. Screenshot
- Two textures in the same layer and sublevel: the one made first is on top. An action button's icon shows over its slot art this way in Forever. Screenshot Guessed as a general rule.
- HIGHLIGHT shows only while the mouse is over the frame, or its highlight is locked; on a button, only while it is enabled. Guessed
Frames at the same level share their layers
This one surprises people. Layers aren't sorted frame by frame. All the frames of one strata and level are sorted together, so a parent's OVERLAY text shows over a child frame's BACKGROUND art when they share a level.