Quantcast
KgPanels Script Help - WoWInterface
 
Thread Tools Display Modes
09-30-12, 09:34 PM   #1
Epiphany17
A Flamescale Wyrmkin
 
Epiphany17's Avatar
AddOn Compiler - Click to view compilations
Join Date: Oct 2009
Posts: 104
KgPanels Script Help

Hullo there! I've finally found time to play again and I've begun my UI building project :P

I'm not sure if it's possible to do with a script, but I want a frame to hide when a unitframe is present. For instance, I want a frame that I have parented to the player frame to hide when there is a pet frame present.

I'm working with gradients and this would help immensely. I just have no idea how to do this
  Reply With Quote
09-30-12, 11:57 PM   #2
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Originally Posted by Epiphany17 View Post
Hullo there! I've finally found time to play again and I've begun my UI building project :P

I'm not sure if it's possible to do with a script, but I want a frame to hide when a unitframe is present. For instance, I want a frame that I have parented to the player frame to hide when there is a pet frame present.

I'm working with gradients and this would help immensely. I just have no idea how to do this
An easy way to do this is just to make a function on the frame that's showing or hiding in its own "OnShow" and "OnHide".

For example:

"OnShow" --
Lua Code:
  1. local f = kgPanels:FetchFrame("framename") -- framename in this instance, would be the name of the kgpanel you want hiding
  2. if f then f:Hide() end

"OnHide" --
Lua Code:
  1. local f = kgPanels:FetchFrame("framename")
  2. if f then f:Show() end
  Reply With Quote
01-06-13, 03:38 PM   #3
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,289
Pet Battle

If you want to hide a Texture while in a pet battle then this is gonna work.

OnLoad

self:RegisterEvent("PET_BATTLE_OPENING_START")
self:RegisterEvent("PET_BATTLE_CLOSE")

OnEvent

if event == "PET_BATTLE_OPENING_START" then
self:Hide()
elseif event == "PET_BATTLE_CLOSE" then
self:Show()
end
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » KgPanels Script Help

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