Thread: KGPanels script
View Single Post
11-10-14, 12:01 AM   #25
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
You want to check that the event passed is equal to the name of the event:

Lua Code:
  1. local oEvents = { -- These are events that we can check for
  2.     "GOSSIP_SHOW",
  3.     "BANKFRAME_OPENED",
  4.     "GUILDBANKFRAME_OPENED"
  5. }
  6.  
  7. if oEvents[event] then -- The 'event' is passed from the OnEvent script within kgPanels
  8.     ChatFrame1:Hide()
  9.     ChatFrame3:Hide()
  10.     ChatFrame1ButtonFrame:Hide()
  11.     ChatFrame3ButtonFrame:Hide()
  12.     ChatFrameMenuButton:Hide()
  13.     GeneralDockManager:Hide()
  14.     FriendsMicroButton:Hide()
  15. else
  16.     ChatFrame1:Show()
  17.     ChatFrame3:Show()
  18.     ChatFrame1ButtonFrame:Show()
  19.     ChatFrame3ButtonFrame:Show()
  20.     ChatFrameMenuButton:Show()
  21.     GeneralDockManager:Show()
  22.     FriendsMicroButton:Show()
  23. end
  Reply With Quote