Originally Posted by Sovereignty
Quick question:
I'm trying to create a script in eePanels that shows the frame when a target is selected and hides it when it's not. I've tried several things but am obviously missing a pretty simple step. How would I go about doing it?
Thanks
|
Setting the panel's Parent to the target frame will have the panel appear/disappear along with the frame. To find out what the target frame element is called, hover over it and type
/print GetMouseFocus():GetName() - this'll return the name of the target frame which you can then tell the eePanel to inherit from.
If you are using Pitbull as your unit frames, however, it becomes a little less simple as Pitbull creates frames only when demanded and discards them afterwards. If you are using eePanels, this seems pretty impossible to get around - I had to upgrade to eePanels2 to do it. If you're asking about creating scripts though, it seems likely you already have version 2.
Version 2 has a checkbox called "Dynamic Frames Fix" which, when checked, attempts to allow parenting to Pitbull elements as normal. It certainly worked fantastically for me.