Eepanels2: Panel hide/show when target is/not selected.
Hi people.
I decided to make new UI,and to finish it i need your help. I must say i'am total nab when it comes to scripting coding atc. Anywai the thing is iam useing eepanels2 to create chat/pet/action bars/target frame background's. Naw what i need is,to make one of eepanels2 background's to fade out if target is not selected,and fade in if i have a target selected. I'am 80% sure its done thro the''LUA script'' option in advanced panel options. Here is 2x screenshots,the panel marked with red squire around is target frame background that i want to fade in/out on target selected/not selected. Picture NR1. Picture NR2. If it is done thro that LUA thing option then i wold love if someone wold tell me what to type in it. If it's not done thro it,maybe someone know a different wai to make it fade out/in? I'am prity sure it's possible,because i remember reading about eepanels,that thei do provide sucha advanced options. |
If you just want it to show with a target, make it's parent the target frame.
I don't know lua so I can't help with the fading part, sorry. |
I don't know about the fading part as I don't have access to wow atm but this is what I use for the showing/hiding of a frame when a target exists:
Code:
function eePanels2:PLAYER_TARGET_CHANGED() |
Quote:
Code:
/print GetMouseFocus():GetName() |
Quote:
this one worked PERFECTLY! thx:) 1 more thing. How the code wold look if i want to hide panel when i dont have pet under my control and show it when i do? |
Same as I told you to do for the target frame (but you didn't listed :p ). Parent that eePanel to the pet frame.
|
Quote:
|
Quote:
You only need to discover the pet frame name typing in chat: /script DEFAULT_CHAT_FRAME:AddMessage(GetMouseFocus():GetName()); |
Quote:
|
Quote:
|
Hi, I hate to hijack the OP thread, but I have a question about eepanels2.
Background: I am using PitBull for all my frames (party, Raid, etc.) I created an interface and I wanted to have a black-ish box around my raid frames when I am in a raid. So, I created an eepanel2 panel for it and bound it to my raid frames by checking the name with [/print GetMouseFocus():GetName()]. Now, it works great until I reload my UI. Then the panel gets shrunk to just the one frame I am using as a reference frame. (PitBullCluster1UnitButton1 in both the Anchor and Parent frames.) So it is not holding the size I set when I create it from load to load. I changed the "Anchor Frame" to the UIParent thinking that it might hold the size correctly. It acts very strangey and does not align correctly from loading time to loading time. So, to my question, I think if I bind it to the parentui for both the anchor and the parent and the script it to show only when I am in a raid it will work as I would like it to. That way I can show the box when either is visible (I had tried 2 seperate frames for each, but, again once I reloaded it would show them both). Any help would be great. I will check back to answer more questions. |
PitBull's frames are tricky. They are only created when needed and they (and their names) get recycled. You do need a script to hide/show for raid and party frames. See the eePanels2 wiki and thread on wowace.com for more info and for example scripts.
|
How do I get this to work with Pearl? I tried '/print GetMouseFocus():GetName()' on it and I get 'Pearl_Target_StatsFrame_CastClickOverlay' and when I set the panel to it...it disappears (I've tried 'TargetFrame' but I still get the same problem). I've also tried the other script and it works but for some reason only on one frame at a time. :confused:
Quote:
|
Quote:
Perl has multiple frames could be tricky, you can try with the frame Perl_Target_Name or Perl_Target_Stats. Try also to modify the level or strata of your panel. I don't use perl but you can try. |
It's also "Perl" not pearl
|
All times are GMT -6. The time now is 09:37 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI