Thread Tools Display Modes
11-30-12, 08:59 PM   #1
feraldrood
A Theradrim Guardian
 
feraldrood's Avatar
Join Date: Dec 2008
Posts: 62
kgPanels sh*ts on my carpet every time I log off

http://postimage.org/gallery/84fcqd04/

pic ONE is when I log in, pic TWO is after a /rl (/reload) with the panels placed correctly.

what in the aslkdjhaslkdjaskjdhb is causing this ?? I swear everything is anchored and locked
only started happening after I made the chat background (it toggles on/off when clicked)

Code:
if pressed then
    if kgPanel16:IsVisible() then
        kgPanel16:Hide()
    else
        kgPanel16:Show()
    end
end
the other panels that create the chat bg are parented to panel 16 so the whole bugger hides

any ideas?

Last edited by feraldrood : 12-01-12 at 05:11 PM. Reason: fixed link
  Reply With Quote
11-30-12, 09:51 PM   #2
Ekaterina
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 65
Have you tried changing the script to:

Lua Code:
  1. if pressed then
  2. if self:IsVisible() then
  3. self:Hide()
  4. else
  5. self:Show()
  6. end
  7. end

to ensure that there isn't a problem with the reference to the frame?

Do you have any other scripts set? Is the chat background parented to a frame other than UIParent? Are any other frames parented or anchored to the chat background?

Last edited by Ekaterina : 11-30-12 at 09:57 PM. Reason: additional questions
  Reply With Quote
11-30-12, 11:36 PM   #3
feraldrood
A Theradrim Guardian
 
feraldrood's Avatar
Join Date: Dec 2008
Posts: 62
Originally Posted by Ekaterina View Post

*snip*
to ensure that there isn't a problem with the reference to the frame?

wouldnt this ^ only call the panel to hide when mouse down, only to show on mouse up?

1: Do you have any other scripts set? nope
2: Is the chat background parented to a frame other than UIParent? nope
3: Are any other frames parented or anchored to the chat background?
yes, the background is three panels, black outer shadow, class color "border" and grey interior
the additional panels are parented to the panel which hides on click, therefore they hide as well
Bad doggy kgpan, stop messing everything up XD
  Reply With Quote
11-30-12, 11:42 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Without seeing your entire, actual scripts, it's impossible to even guess at what might be happening.
__________________
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
12-01-12, 12:10 AM   #5
feraldrood
A Theradrim Guardian
 
feraldrood's Avatar
Join Date: Dec 2008
Posts: 62
Originally Posted by Phanx View Post
Without seeing your entire, actual scripts, it's impossible to even guess at what might be happening.
the only other script I use is to class color the *spoiler* CLASS colored frames (nothing wrong there)
again, the change only started around the time I added the on click function in my first post

perhaps there is a way to "auto /rl" upon log in? how would I do this?
  Reply With Quote
12-01-12, 01:42 AM   #6
Ekaterina
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 65
A bit of testing indicates that possibly once it's hidden, the frame then won't receive the 'click' again to unhide.

Try using in your onclick:
Lua Code:
  1. if pressed then -- if the  mouse button is pressed while over the frame do the following
  2.  
  3.  if self:GetAlpha() > 0 then -- checks to see if the alpha of the frame is greater than 0 (invisible)
  4. self:SetAlpha(0) -- if so make it invisible
  5. else
  6. self:SetAlpha(1)  -- otherwise make it fully visible, which should return it to the setting you set in the kgpanels config screens.
  7. end
  8. end

self here just means that it's referring to the frame that you are attaching the scripts to.

The parent frame alpha also effects the children frames, so this should hide all three.

Last edited by Ekaterina : 12-01-12 at 01:47 AM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » kgPanels sh*ts on my carpet every time I log off


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