Originally Posted by Phanx
Why bother checking whether the corner resizers were already created, when the function will only run once per frame anyway? And if you're intending for the function to be able to run multiple times per frame (so that the checks make sense) then why re-create and re-set the same scripts on the resizers over and over instead of setting them just once when you create the resizers? Also, you have a huge amount of duplicate code in there, you're not using proper capitalization for frame types or layers or points, you're using if-end/if-end instead of if-else-end, and several things in there just don't make any sense, like:
Code:
frame.bottomrightframe:SetFrameLevel(frame.frameLevel + 7 or 20)
What on earth is the "or 20" for? There's no check being performed here...
|
I actually just merged this from two different codes, so it's not optimized properly yet. About the capitalization it's simply because it's much easier to read "TopLeft", then "TOPLEFT" at least for me.