View Single Post
Old 02-06-05, 02:43 PM   #1
Goatus
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 18
frameStrata / toplevel / FrameLevel

Well probably all more expirienced WoW UI modders know all of these but it may be usefull for someone who is just starting
  • frameStrata
    • what it is: it't atribute which you use to define on what layer level your frame should show. Include it in your frame tag next to other atributes
    • use: frameStrata="value"
    • default value:inherits from parent if no parent is set then MEDIUM
    • Values: (From highest to lowest. ie higher frameStrata frame will be above lower one)
      • TOOLTIP (important: TOOLTIP value seem to block your frame from reciving OnMouse events like OnEnter or OnClick)
      • FULLSCREEN_DIALOG
      • FULLSCREEN
      • DIALOG
      • HIGH
      • MEDIUM
      • LOW
      • BACKGROUND (note: seting frameStrata to BACKGROUND will also block your frame from reciving mouse events until you set FrameLevel to 1 or more)
    • Notes:
      • if two frames have same frameStrata values one loaded earlier will be abowe one loaded later (that is why all orginal ui things are higher than similar level addon ones)
  • toplevel
    • what it is:same as frameStrata it is atribute, this one is kinda unknow purpose yet but it seem to affect frame graphic effects.
    • use:toplevel="true" or "false" (default)
    • Notes:
      • If 2 or more frames with same frameStrata values have toplevel set as true then normal rules will apply (ie one loaded earlier is above)
      • toplevel seem to work only on art (graphical effects) it doesnt affect things as OnEnter event (ie if lower frame is loaded earlier it still will recive OnEnter event, not the higher frame with toplevel value set on true)
  • FrameLevel(Corrections thanks to Mondinga)
    • what it is:It seem to be internal frame variable which is responsible for proper layering frames with same frameStrata value
    • use: to read FrameLevel: this:GetFrameLevel() to set FrameLevel SetFrameLevel(number)
    • Notes:
      • Frames start with FrameLevel = parent FrameLevel+1 (if parent is set) or 0 (if there is no parent)
      • FrameLevel will never bring your frame above higher frameStrata frame
      • FrameLevel affects mouse events (not like toplevel)
      • Important FrameLevel = 1 is enough to bring your frame above frame with same frameStrata and toplevel="true"

This info is based on my experiments and it may be wrong (although it shouldnt) if i made mistake somewhere please corect me

also if you have anything to add based on your personal expirience please do it

BTW: sorry for bad english and grammar -_-

Last edited by Goatus : 02-07-05 at 01:39 PM.
Goatus is offline   Reply With Quote