diff BuffFrame/BuffButton.lua @ 59:07ef62fe201f

Re-write of BuffFrame module: - uses secure hooks on blizzard BuffFrame.lua functions to determine needed action - make use of built-in table behavior to reduce unnecessary frame updates
author Nenue
date Thu, 28 Jul 2016 18:27:56 -0400
parents d7655c4e6e06
children
line wrap: on
line diff
--- a/BuffFrame/BuffButton.lua	Fri Jul 08 18:01:49 2016 -0400
+++ b/BuffFrame/BuffButton.lua	Thu Jul 28 18:27:56 2016 -0400
@@ -131,9 +131,9 @@
     guide.info = {} -- UnitAura cache
 
     if i == consolidatedPosition then
-      guide.legend:SetTexture(1,1,0,0.5)
+      guide.legend:SetColorTexture(1,1,0,0.5)
     else
-      guide.legend:SetTexture(legend.r, legend.g, legend.b, legend.a)
+      guide.legend:SetColorTexture(legend.r, legend.g, legend.b, legend.a)
     end
 
     guide.idText:SetText(i) -- needs to reflect the current position
@@ -274,18 +274,18 @@
           end
 
           if debuffBorder then
-            deco.background:SetTexture(debuffBorder:GetVertexColor())
+            deco.background:SetColorTexture(debuffBorder:GetVertexColor())
             debuffBorder:Hide()
           else
             if guide.info.caster == 'player' then
               print(guide.info.caster)
-              deco.background:SetTexture(unpack(c.PlayerColor))
+              deco.background:SetColorTexture(unpack(c.PlayerColor))
             elseif buffData.isBossDebuff then
               print(guide.info.isBossDebuff)
-              deco.background:SetTexture(unpack(c.BossColor))
+              deco.background:SetColorTexture(unpack(c.BossColor))
             else
               print(guide.info.caster)
-              deco.background:SetTexture(unpack(c.Color))
+              deco.background:SetColorTexture(unpack(c.Color))
             end
           end