Reply
 
Thread Tools Display Modes
Old 02-19-11, 10:13 PM   #21
Lyukyui
A Murloc Raider
Join Date: Feb 2011
Posts: 5
I believe messing around with some code while creating once UI is the best way to get used to lua...
If you change something and you wreck it, you know what is wrong and that helps alot.

Sry but btt:
I got my panel and my bar toggled on click. But i still can't figure out how to move this stuf...
And I just decided to let the switch panel stay static. If I had to move this switch too i think it will get pretty complicated.
Lyukyui is offline   Reply With Quote
Old 02-19-11, 11:05 PM   #22
Nobgul
A Molten Giant
 
Nobgul's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 693
I can give you some movement code. If you want to be able to move it while open. If you want to save the position and stuff like that then yes it will get more complex.
__________________
Nobgul is offline   Reply With Quote
Old 02-19-11, 11:27 PM   #23
Nobgul
A Molten Giant
 
Nobgul's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 693
type /fstack get the cursor position of where you want the frame to be.

In the scripts section of the kgpanel under OnLoad input the following script.

FRAMENAME:ClearAllPoints()
FRAMENAME:SetPoint("TOPRIGHT", UIParent, "TOPRIGHT", -20, -110)

Change the Frame name as well as the 2 numerical positions and you should be good.

You should be set. If you wanted to animate the frames let me know we can work on that code.
__________________
Nobgul is offline   Reply With Quote
Old 02-19-11, 11:53 PM   #24
Lyukyui
A Murloc Raider
Join Date: Feb 2011
Posts: 5
Thanks a lot!
I got the panel in position now, and yes, i'd really like to move it while visible.

Now it is set to the right of my screen. The panel position is set to where it should stay when slided out and hidden (outside the screen), the script position is where it should stay to display my bars.
For animation i'd like a smooth slide from right to left.

Is it actually possible to let it slide back before hiding when toggled again?

I guess its getting pretty complicated here ;p
Lyukyui is offline   Reply With Quote
Reply

Go BackWoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » kgpanels movement script

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off