grievious
14-07-2007, 06:45 PM
Hi,
I would like to make an addon who should be able to hide one chat frame when we are in raid party.
For exemple, I have 2 chat frame, one to the left where i have my "Guild", "party" an "raid" chan and the second chat frame, to the right, where we have the "General", "Cry" and "Said" chan. It's this second chan i'would like to hide when i'm in a raid group.
I've tried to make it alone, but it dosen't work.
This my files :
1st the .TOC file (HicheChat.toc)
## Interface: 20100
## Author: Shamonyou
## Title: HideChat
## Notes: Hide a chat frame in raid
## Version: 0.00.1
## DefaultState: Enabled
## SavedVariables: hidechat
HideChat.lua
2d the .lua file (HideChat.lua)
function AutohideChat_OnLoad()
this:RegisterEvent("RAID_ROSTER_UPDATE");
end
function AutohideChat_OnEvent(event)
if(event=="RAID_ROSTER_UPDATE") then
if ChatFrame3:IsShown() then ChatFrame3:Hide() else ChatFrame3:Show() end
end
end
When i make a simply macro, it works :
/script if ChatFrame1:IsShown() then ChatFrame1:Hide() else ChatFrame1:Show() end
Can you Help me please ?
I would like to make an addon who should be able to hide one chat frame when we are in raid party.
For exemple, I have 2 chat frame, one to the left where i have my "Guild", "party" an "raid" chan and the second chat frame, to the right, where we have the "General", "Cry" and "Said" chan. It's this second chan i'would like to hide when i'm in a raid group.
I've tried to make it alone, but it dosen't work.
This my files :
1st the .TOC file (HicheChat.toc)
## Interface: 20100
## Author: Shamonyou
## Title: HideChat
## Notes: Hide a chat frame in raid
## Version: 0.00.1
## DefaultState: Enabled
## SavedVariables: hidechat
HideChat.lua
2d the .lua file (HideChat.lua)
function AutohideChat_OnLoad()
this:RegisterEvent("RAID_ROSTER_UPDATE");
end
function AutohideChat_OnEvent(event)
if(event=="RAID_ROSTER_UPDATE") then
if ChatFrame3:IsShown() then ChatFrame3:Hide() else ChatFrame3:Show() end
end
end
When i make a simply macro, it works :
/script if ChatFrame1:IsShown() then ChatFrame1:Hide() else ChatFrame1:Show() end
Can you Help me please ?