View Single Post
11-05-20, 09:11 PM   #1
Fossey
A Kobold Labourer
Join Date: Nov 2020
Posts: 1
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
  Reply With Quote