FrameStrata

From Wowpedia
Jump to: navigation, search

FrameStrata is a frame property that determines the coarse order in which UI frames are composited onto the screen. The following stratas exist:

  1. WORLD (reserved for WorldFrame, cannot be assigned)
  2. BACKGROUND
  3. LOW
  4. MEDIUM
  5. HIGH
  6. DIALOG
  7. FULLSCREEN
  8. FULLSCREEN_DIALOG
  9. TOOLTIP

These values are ordered in ascending order; thus, a frame in the HIGH strata will always be composited on top of a frame in the MEDIUM strata. If two frames belong to the same strata, the compositing order is determined by their FrameLevel property.

Specifying frame strata

FrameStrata can be specified using the frameStrata property of XML Frame/Button/etc tags; in this context, a special value of PARENT is also accepted, and indicates that you want to put your frame into the same strata as your frame's parent.

You can change frame strata using the Frame:SetFrameStrata widget method; additionally, strata is automatically changed to that of the parent frame when calling Frame:SetParent.

Notes

  • Commonly, you'll do best to resist the temptation of setting FrameStrata for every frame you create. Unless you have a very special case, it should suffice to set the strata for the "main" frame, and just properly parent subsequent elements (background contains elements, elements contain widgets, widgets contain own highlights or something). Child elements are always rendered on top of their parents and that's the primary (if not only) layering technique you should use.