View Single Post
09-05-12, 09:44 PM   #4
nailertn
An Aku'mai Servant
Join Date: Oct 2008
Posts: 33
Originally Posted by yssaril View Post
change the level of the texture not frame

also it is a bad habbit to call both textures "textures" give them unique names such as foreground_texture and background_texture

edit: also why create 2 frames when one will do just fine?


edit2: hmmm something screwy on my end disregard the above for now
"Manipulating frame levels, frame stratas or draw layers changes nothing." Even if it did, it still doesn't explain why a frame with leve 0 and strata "BACKGROUND" gets rendered on top of a frame with level 100 and strata "HIGH". The above code is just a demonstration, please treat it as such. All it has in common with what I am currently working is the problem it describes. There are ways to circumvent it, it's not even a big deal, but I would like to actually understand what's going on.

Originally Posted by Phanx View Post
That's generally how it works -- if multiple objects are parented to the same object, the first one created gets parent level + 1, the second one gets parent level + 2, and so on.

However, :SetFrameLevel should work as expected. I don't have access to WoW right now (at work) but I'll try your code later if I remember.
Don't child frames simply get parent frame level + 1 after CreateFrame or SetParent, regardless of how many children their parent already has? Or do you mean compound parenting as in child is +1, child's child is +2? Frankly I didn't even consider Set / GetFrameLevel being the culprit because according to the screenshot the frames are ordered correctly and the rendering ignores not just levels but stratas too. I'll check for any metatable shenanigans though just to make sure.
  Reply With Quote