changeset 8:d0b83b70c7f8

add code to hide the blizz frames. Currently commented
author Chris Mellon <arkanes@gmai.com>
date Tue, 12 Oct 2010 18:58:24 -0500
parents 31048236391d
children ede17cc71b66
files KBF.lua
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/KBF.lua	Tue Oct 12 18:37:59 2010 -0500
+++ b/KBF.lua	Tue Oct 12 18:58:24 2010 -0500
@@ -17,13 +17,29 @@
     -- set up the countdown timer
     -- TODO: Fancy enable/disable based on whether you have any timed buffs.
     -- Not a big deal, how often do you care about that
+    -- also TODO: Maybe should bucket OnUpdates somehow
     self.anchor:SetScript("OnUpdate", function() self:OnUpdate() end)
     self.dirty = true -- force an immediate scan on login
+    --self:HideBlizzardBuffFrames()
 end
 -- naming convention
 -- "frame" is the secure aura button created by the group handler
 -- "bar" is the set of icon + status bars that we create to show the buff time
 
+function kbf:HideBlizzardBuffFrames()
+    local function HideBlizFrame(frame)
+        if not frame then return end
+        frame:UnregisterAllEvents()
+        frame:SetScript("OnUpdate", nil)
+        frame:Hide()
+        frame.Show = function() end
+    end
+    HideBlizFrame(BuffFrame)
+    HideBlizFrame(ConsolidatedBuffs)
+    HideBlizFrame(TemporaryEnchantFrame)
+    
+end
+
 function kbf:OnUpdate()
     for idx=1,99 do
         local frame = self.secureFrame:GetAttribute("child"..idx)