Originally Posted by Epiphany17
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:
local f = kgPanels:FetchFrame("framename") -- framename in this instance, would be the name of the kgpanel you want hiding
if f then f:Hide() end
"OnHide" --
Lua Code:
local f = kgPanels:FetchFrame("framename")
if f then f:Show() end