WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   KGpanels and Details! script help (https://www.wowinterface.com/forums/showthread.php?t=58368)

Fossey 11-05-20 09:11 PM

KGpanels and Details! script help
 
Hi guys, this is a 2 parter.

part 1:
What i'm trying to achieve is to have my details damage meters show/hide depending on which chat window I currently have active. So i have it set to show when i'm on the "DMG" tab, and to hide if on any other tab. I have achieved this, but i feel it's a really long winded way of doing it

--on event--

ChatFrame1:SetScript("OnShow",function(frame)
DetailsRowFrame2:Hide()
DetailsBaseFrame2:Hide()
Details_WindowFrame2:Hide()
DetailsRowFrame1:Hide()
DetailsBaseFrame1:Hide()
Details_WindowFrame1:Hide()
end)

ChatFrame2 etc etc....

I have this for every chat frame, EXCEPT for the 6th which is my dmg tab, and it shows the details frames instead of hiding. works fine. Is there a shorter way to write this ? like an if statement ?

like basically: if chatframe6:isshown then
details show
else
details hide
end

part 2:
Whenever i log in, the details meters shows up over the top of the general tab, and subsequently all the chat window text, i then haveto click another tab to hide it as per code above, to get it to operate normally how i want.
Is there a script to hide details when logging in on a character ? I've played around with some scripting, but havn't managed to get it to work.

i had:

--on load--
self:RegisterEvent("PLAYER_ENTERING_WORLD")

but then don't know where to go from there (if thats even the right event)


thankyou in advance


All times are GMT -6. The time now is 03:32 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI