I try to make frames fade in/out and slide in/out when shown and hid. This would apply to all the standard frames like character frames, achievement frame, calendar and so forth.
http://pastey.net/141851
The code is in alpha stage, it's not good at all I am sure. The main thing I am curious about is if there is another, perhaps more performance friendly way of hooking these frames and their show/hide?
Some frames use ShowUIPanel() to show, so just using :Hide() would make them act funny. Other frames simply clip and bug out when you spam them too much and too fast. If you run my code on CharacterFrame and you spam the "C" key too fast it may bug where the ShowUIPanel thinks its hidden when it's visible and such... hard to explain.
If anyone has some ideas I am all ears. So far it does not really use more than 60KB code to hook 120 frames, then it decays under 20KB to idle. My problem is that I want to write this shorter, more neat!
Thanks guys, out!
Edit: last thing, I also wish to add a slide in/out feature where the frame when shown, I will GetPoint(1) then put it let's say 64 pixels on the left/right (depending what side is closer) then make it slide in into position while fading in. It would fade out and slide out in the same manner when hid. Problem also is if I hook the :Hide then I can't use :Hide() within the code or I will make a loop... I also wish for a easy way to avoid this without too much newbie like code, hmm...