Sliding Panel
Is it at all possible to script a kgpanel, that would 'slide', for want fo a better word, when you clicked or moused over it? Say I wanted to hide a panel under minimap, or off the side of the screen, but have it slide into view when I moused over or clicked it?
|
Are you asking for it to appear/disappear instantly, or to actually "slide" as in an animation?
If you're looking for it to actually animate, I'd look at the Translation Animation provided in the default UI. |
Actually slide in...the Lightheaded panel gave me the idea. But looking at that link lets me know that it's waaaay over my head, lol. My thanks~
|
I just whipped this little bit of code up in game:
Code:
f = f or CreateFrame("Frame","animTest",UIParent); |
That's pretty spectacular..but how would I apply that to a kgpanel? I know making just the frame like that is easier, in some ways, but I'm extremely lua illiterate. My basic idea was to have a panel parented to an action bar ( I use Bartender) and have it slide into view when I moused over or clicked a certain region. Thank you, by the way, for taking the time to answer my questions~
|
I threw this together real quick
Create a frame like you normally would, then put this in it's OnLoad script. Make sure you enable mouse clicks. OnLoad: Code:
local open = false; -- Don't change this I've gotta go to bed for now, I'll look further into this tomorrow! |
Sweet, thank you VERY much, Waky. :banana:
Wow. Just..wow. For all it's simplicity (what it does, not how it's written) that has got to be one of the coolest things I've seen. I just sat there and clicked it non-stop, for like 20 minutes. Even WITH the jitter. |
Remade the code here:
OnLoad: Code:
Hope this works! |
Cool, thanks Waky. Might have to see how that works. Was thinking of something similar for some of my plugin addons.
|
Waky, this worked PERFECTLY. My thanks, very much~
:D :banana: :eek: |
All times are GMT -6. The time now is 08:59 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI