Thread Tools Display Modes
09-15-14, 09:38 PM   #1
Lightbound
An Aku'mai Servant
 
Lightbound's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2014
Posts: 35
KGPanels onclick enlarge / hide event.

Hello there!

Im very new to this and i already got my first problem c:.

I want to provide backgrounds for some things with a onclick event but im not sure how to do it.

I got this script:

Code:
if pressed then
if kgPanels:FetchFrame("stance_closed"):IsVisible() then
kgPanels:FetchFrame("stance_open"):Hide()
else
kgPanels:FetchFrame("stance_closed"):Show()
end
end
It is very simple and i know what it does but im not sure how to do the Frames. I created two active panels one (stance_closed) contains the image for the closed stance background and the otherone (stance_opened) contains the opened image.

I did put the scripts in the OnClick part of both panels and just switched the names in the script. I also enabled the register clicks on image thing but currently it isnt working. I belive i dont have to do two panels or something like that. Could someone explain me what i did wrong?
  Reply With Quote
09-16-14, 09:35 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
What exactly are you trying to achieve? Do you want to click on the panel to switch which image it shows? Or do you want two panels in separate locations, and click on one to hide it and show the other?
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
09-18-14, 01:50 PM   #3
Lightbound
An Aku'mai Servant
 
Lightbound's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2014
Posts: 35
It seems like i got a old kgPanel version or something like that. I cant see any option to select like two background textures or images to make them switch in one panel. I already got it to work. As usual not the best way but it's working.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » KGPanels onclick enlarge / hide event.


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