Quantcast
WoWInterface - View Single Post - FrameStrata/FrameLevel bug?
View Single Post
06-22-16, 02:03 AM   #2
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,739
Whenever possible try to create the framestack without using SetFrameLevel or SetFrameStrata. Those should be used for the base frame only. Always try to create your stack via frame parenting and texture sublayers.

Code:
frame1
|-texture1, sublayer -7
|-texture2, sublayer -6
|-frame2
  |-texture1, sublayer -7
  |-frame3
    |-texture1, sublayer -7
Lua Code:
  1. local frame1 = CreateFrame("Frame",nil,UIParent)
  2. --frame1:SetBackdrop(backdrop)
  3. frame1.texture1 = frame1:CreateTexture(nil,"BACKGROUND",nil,-7)
  4. frame1.texture2 = frame1:CreateTexture(nil,"BACKGROUND",nil,-6)
  5. local frame2 = CreateFrame("Frame",nil,frame1)
  6. frame2.texture1 = frame2:CreateTexture(nil,"BACKGROUND",nil,-7)
  7. local frame3 = CreateFrame("Frame",nil,frame2)
  8. frame3.texture1 = frame3:CreateTexture(nil,"BACKGROUND",nil,-7)
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)