comparison KBF.lua @ 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
comparison
equal deleted inserted replaced
38:0addebdd412f 39:0aeebc3f4fe9
397 secureHeader:SetAttribute("consolidateTo", 1) 397 secureHeader:SetAttribute("consolidateTo", 1)
398 secureHeader:SetPoint("TOP", anchor, "TOP", 0, 0) 398 secureHeader:SetPoint("TOP", anchor, "TOP", 0, 0)
399 399
400 -- this is the "button" in the aura flow that represents the consolidated buffs. 400 -- this is the "button" in the aura flow that represents the consolidated buffs.
401 -- pre-creating it here in order to perform customization 401 -- pre-creating it here in order to perform customization
402 local consolidateProxy = self:ConstructBar() 402 --local consolidateProxy = self:ConstructBar()
403 local consolidateProxy = CreateFrame("BUTTON", nil, UIParent, "SecureActionButtonTemplate")
404 consolidateProxy:SetNormalTexture("Interface\\TargetingFrame\\UI-StatusBar")
405 consolidateProxy:SetWidth(200 +16)
406 consolidateProxy:SetHeight(16)
403 secureHeader:SetAttribute("consolidateProxy", consolidateProxy) 407 secureHeader:SetAttribute("consolidateProxy", consolidateProxy)
404 secureHeader:SetAttribute("frameref-proxy", GetFrameHandle(consolidateProxy)) 408 secureHeader:SetAttribute("frameref-proxy", GetFrameHandle(consolidateProxy))
405 -- this is the equivilent of the secureHeader for the consolidated buffs 409 -- this is the equivilent of the secureHeader for the consolidated buffs
406 -- pre-creating again, so we can customize/size/position it 410 -- pre-creating again, so we can customize/size/position it
407 local consolidateHeader = CreateFrame("FRAME", "KBFConsolidatedAnchorFrame", consolidateProxy) 411 local consolidateHeader = CreateFrame("FRAME", "KBFConsolidatedAnchorFrame", consolidateProxy)
412
408 self:SetCommonSecureHeaderAttributes(consolidateHeader) 413 self:SetCommonSecureHeaderAttributes(consolidateHeader)
409 secureHeader:SetAttribute("consolidateHeader", consolidateHeader) 414 secureHeader:SetAttribute("consolidateHeader", consolidateHeader)
410 -- position it relative to the proxy, so it can appear where we want it 415 consolidateProxy:SetAttribute("header", consolidateHeader);
416 consolidateProxy:SetAttribute("frameref-header", GetFrameHandle(consolidateHeader))
417
418 -- position it relative to the proxy, so it can appear where we want it
411 consolidateHeader:SetPoint("TOPRIGHT", consolidateProxy, "TOPLEFT", 0, 0) 419 consolidateHeader:SetPoint("TOPRIGHT", consolidateProxy, "TOPLEFT", 0, 0)
412 consolidateHeader:SetWidth(200 +16) 420 consolidateHeader:SetWidth(200 +16)
413 consolidateHeader:SetHeight(16) 421 consolidateHeader:SetHeight(16)
414 consolidateHeader:Show() 422 consolidateHeader:Show()
415 consolidateProxy:SetAttribute("header", consolidateHeader); 423
416 consolidateProxy:SetAttribute("frameref-header", GetFrameHandle(consolidateHeader)) 424 consolidateProxy:SetAttribute("type", consolidateHeader.Show)
425
426 RegisterStateDriver(consolidateHeader, "visibility", "show")
427
417 return anchor, secureHeader, consolidateHeader, consolidateProxy 428 return anchor, secureHeader, consolidateHeader, consolidateProxy
418 end 429 end
419 430
420 --- sets the attributes needed by all the headers 431 --- sets the attributes needed by all the headers
421 function kbf:SetCommonSecureHeaderAttributes(frame) 432 function kbf:SetCommonSecureHeaderAttributes(frame)