OAP Lizzard A game interface engine
Game interfaces, outside the game Settings
← XML guide

Documentation / XML guide

Layering

Strata, frame levels, draw layers and sublevels: what draws on top of what.

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.

The order Lizzard sorts drawing by First the frame's strata, then whether and when it was raised, then its frame level. All frames with the same strata and level then form one group, whose textures and font strings are sorted together: by draw layer, textures before font strings, by sublevel, by the frame's own order, and last by the order they were made. Frames 1 frameStrataBACKGROUND, LOW, MEDIUM, ... TOOLTIP 2 raiseda frame raised later goes above, at any level 3 frameLevela number; higher is on top Then everything in frames of the same strata and level, together 4 draw layerBACKGROUND, BORDER, ARTWORK, OVERLAY, HIGHLIGHT 5 textures, then textin one layer, font strings over textures 6 subleveltextureSubLevel, -8 to 7 7 frame orderthe frames' own order 8 made firsttextures: the first made is on top
Each step only breaks ties left by the one above it. A frame's strata outranks everything else: a texture in a HIGH frame is over every texture in a MEDIUM one, whatever their layers.

Strata

The nine strata, lowest at the bottom From the bottom: BACKGROUND, LOW, MEDIUM, HIGH, DIALOG, FULLSCREEN, FULLSCREEN_DIALOG, TOOLTIP and BLIZZARD. MEDIUM is the strata of a new frame with no parent. BACKGROUND LOW MEDIUM HIGH DIALOG FULLSCREEN FULLSCREEN_DIALOG TOOLTIP BLIZZARD a new frame with no parent on top underneath
The names and their order come from 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)
  • frameLevel and useParentLevel="true" move the frames the element's templates already made by the same amount, as SetFrameLevel does. 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>
The five draw layers of MyBar, drawn apart Five layers stacked from BACKGROUND at the bottom through BORDER, ARTWORK and OVERLAY to HIGHLIGHT at the top. MyBar's Bg is in BACKGROUND, its Fill in ARTWORK at sublevel 2, its Label in OVERLAY and its Glow in HIGHLIGHT, which shows only while the mouse is over the frame. BACKGROUNDBg BORDER(empty) ARTWORKFill, sublevel 2 OVERLAYLabel HIGHLIGHTGlow: only whilethe mouse is over Each layer has sublevels -8 to 7; ARTWORK and 0 if not given.
Layers stack from BACKGROUND up. Within a layer, font strings go over textures whatever their sublevels, then sublevels decide.
  • A <Layer> with no level is ARTWORK, with no textureSubLevel 0, as UI.xsd says. 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.

A unit frame's name over its health bar A unit frame at level 5 has a name font string in OVERLAY. Its child health bar is also at level 5 and has art in BACKGROUND and BORDER. Drawn frame by frame, the bar would cover the name. Sorted as one group, the bar's art comes first and the name is on top, as the game shows it. Frame by frame (not what happens) 3 health bar: BORDER 2 health bar: BACKGROUND 1 unit frame: name (OVERLAY) the parent first, then its child: the bar would cover the name As one group (what the game shows) 3 unit frame: name (OVERLAY) 2 health bar: BORDER 1 health bar: BACKGROUND sorted by layer across both frames: the name is on top Drawn 1, 2, 3; the top of each stack is on top. Both frames are at level 5 (useParentLevel).
From the game's Options screen, whose nameplate preview shows a unit's name over its health bar. Screenshot A child frame at a higher level is drawn after, and over, everything in its parent.