changeset 39:0aeebc3f4fe9

more dead end exploration into consolidated buffs
author Chris Mellon <arkanes@gmail.com>
date Fri, 07 Jan 2011 09:04:46 -0600
parents 0addebdd412f
children 5def7d061738
files KBF.lua
diffstat 1 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/KBF.lua	Fri Dec 31 13:13:54 2010 -0600
+++ b/KBF.lua	Fri Jan 07 09:04:46 2011 -0600
@@ -399,21 +399,32 @@
     
     -- this is the "button" in the aura flow that represents the consolidated buffs.
     -- pre-creating it here in order to perform customization
-    local consolidateProxy = self:ConstructBar()
+    --local consolidateProxy = self:ConstructBar()
+    local consolidateProxy = CreateFrame("BUTTON", nil, UIParent, "SecureActionButtonTemplate")
+    consolidateProxy:SetNormalTexture("Interface\\TargetingFrame\\UI-StatusBar")
+    consolidateProxy:SetWidth(200 +16)
+	consolidateProxy:SetHeight(16)
     secureHeader:SetAttribute("consolidateProxy", consolidateProxy)
     secureHeader:SetAttribute("frameref-proxy", GetFrameHandle(consolidateProxy))
     -- this is the equivilent of the secureHeader for the consolidated buffs
     -- pre-creating again, so we can customize/size/position it
     local consolidateHeader = CreateFrame("FRAME", "KBFConsolidatedAnchorFrame", consolidateProxy)
+    
     self:SetCommonSecureHeaderAttributes(consolidateHeader)
     secureHeader:SetAttribute("consolidateHeader", consolidateHeader)
-    -- position it relative to the proxy, so it can appear where we want it
+	consolidateProxy:SetAttribute("header", consolidateHeader);
+	consolidateProxy:SetAttribute("frameref-header", GetFrameHandle(consolidateHeader))
+	
+	-- position it relative to the proxy, so it can appear where we want it
     consolidateHeader:SetPoint("TOPRIGHT", consolidateProxy, "TOPLEFT", 0, 0)
 	consolidateHeader:SetWidth(200 +16)
 	consolidateHeader:SetHeight(16)
 	consolidateHeader:Show()
-	consolidateProxy:SetAttribute("header", consolidateHeader);
-	consolidateProxy:SetAttribute("frameref-header", GetFrameHandle(consolidateHeader))
+
+	consolidateProxy:SetAttribute("type", consolidateHeader.Show)
+	
+	RegisterStateDriver(consolidateHeader, "visibility", "show")
+	
     return anchor, secureHeader, consolidateHeader, consolidateProxy
 end