I'm really new to this whole kgPanels thing (I got it today haha) was just wondering what the script would be to only show a texture when i have a target. I am trying to go for the infamous Kait:Auras glowing health orb look if that helps anybody. Have made a circle texture, just need the script/code to make it only appear when i target something, so that i dont have a random circle in the middle of my screen. Any help would be greatly appreciated, thanks!
I don't use kgPanels myself. But this may help you.
- KgPanels, Player, Target, Anchoring -
Now we're going to create panels for the player and target frame. The problem with target frame is obvious. We're not always targeting someone or something, so we need the panel to disappear if we're not targeting anything. This is done by parenting frames.
Go ahead and create a new panel with the name "Player". Copy All from Buttons and move it into place, very simple.
Now that we've made it fit with the player frame, the target frame will use the same dimensions. So it's going to be very easy for us. Make a new panel named "Target" and copy all from Player. Sometimes, as in my case it refuse to copy, simply type "/rl" and do it again.
Lock the panel once it's in place. Now we need to figure out what the target frame is called, so that we can parent the panel to the frame. Do this by using this macro. "/run ChatFrame1:AddMessage(GetMouseFocus():GetName())" while your mouse is hovering over the target frame. My target frame is called: "PitBullUnitFrame3". Remember that you need to copy EXACTLY what it says, including capital letters.
At the absolute bottom of Target are two options. Anchor and Parent. Anchor decides the position, if you move the target frame, it will move with. The Parent frame follows whatever action happens. Shown, Hidden etc.
So set the Parent to "PitBullUnitFrame3" or whatever yours was, be sure to press Okay. You don't need to anchor this frame unless you're planning on moving your target frame constantly.
well, yes, but parenting the kgPanel to the frame is 100x better...
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh