diff Modules/BuffFrame.lua @ 97:5476337198ec

- apply default anchors when docking modules - Arifact Power tracker: totals AP items in bags and bank, and forecasts progress on each weapon. Requires user to shift-click each weapon at least once to get initial XP data.
author Nenue
date Mon, 16 Jan 2017 20:24:12 -0500
parents bb38bc0e787f
children 6fa74abd83fd
line wrap: on
line diff
--- a/Modules/BuffFrame.lua	Tue Jan 03 14:06:41 2017 -0500
+++ b/Modules/BuffFrame.lua	Mon Jan 16 20:24:12 2017 -0500
@@ -35,7 +35,7 @@
 local COUNT_PARENT
 
 local DURATION_ANCHOR = 'BOTTOMLEFT'
-local DURATION_INSET = 4
+local DURATION_INSET = 1
 local DURATION_PARENT
 
 VeneerBuffFrameMixin = {
@@ -243,7 +243,6 @@
     (ANCHOR_INSET_DELTA[COUNT_ANCHOR][1] * COUNT_INSET),
     (ANCHOR_INSET_DELTA[COUNT_ANCHOR][2] * COUNT_INSET))
 
-
   self.underlay:SetParent(UIParent)
 
   self.underlay:SetFrameStrata('BACKGROUND')
@@ -290,7 +289,7 @@
 
 
   hooksecurefunc("BuffFrame_Update", function(...) self:OnBuffFrameUpdate(...) end)
-  --hooksecurefunc("AuraButton_UpdateDuration", function(...) self:OnUpdateDuration(...) end)
+  hooksecurefunc("AuraButton_UpdateDuration", function(...) self:OnUpdateDuration(...) end)
   hooksecurefunc("AuraButton_Update", function(...) self:OnAuraButton_Update(...) end)
   hooksecurefunc("BuffFrame_UpdateAllBuffAnchors", function(...) self:OnUpdateAllBuffAnchors(...) end)
   hooksecurefunc("TemporaryEnchantFrame_Update", function(...) self:OnTemporaryEnchantFrameUpdate(...) end)
@@ -564,7 +563,7 @@
   end
 end
 function plugin:OnUpdateDuration (frame, timeLeft)
-  local veneer = self:Acquire(frame)
+  local veneer = self:Acquire(frame:GetName())
   local hours =  floor(timeLeft/3600)
   local minutes = floor(mod(timeLeft, 3600)/60)
   local seconds = floor(mod(timeLeft, 60))
@@ -580,13 +579,11 @@
   if timeLeft < 10 then
     if not veneer.duration.getHuge then
       veneer.duration.getHuge = true
-      veneer.duration:SetFontObject(VeneerNumberFontLarge)
-      veneer.duration:SetTextColor(1,1,0,1)
+      veneer.duration:SetTextColor(1,.5,0,1)
     end
   else
     if veneer.duration.getHuge then
       veneer.duration.getHuge = nil
-      veneer.duration:SetFontObject(VeneerNumberFont)
       veneer.duration:SetTextColor(1,1,1,1)
     end
   end