diff Modules/Currency.lua @ 114:6748c98a6c6c

- Reworked OrderHallHandler triggers - OrderHallHandler minimializes hud info - WorldState currency headers have a unified font
author Nick@Zahhak
date Mon, 27 Mar 2017 00:39:29 -0400
parents 2105b6e5095f
children 8c94bee4fdfc
line wrap: on
line diff
--- a/Modules/Currency.lua	Sun Mar 26 06:25:18 2017 -0400
+++ b/Modules/Currency.lua	Mon Mar 27 00:39:29 2017 -0400
@@ -85,6 +85,7 @@
       frame.Update = function (block)
         debug('Update [Currency]')
         local name, earned, texture, earnedThisWeek, weeklyMax, totalMax = GetCurrencyInfo(currencyID)
+        
         block.Icon:SetTexture(texture)
         block.Label:SetFormattedText("%d / %d", earned, totalMax)
         block:SetWidth(block.Icon:GetWidth() + block.Label:GetStringWidth() + 6)
@@ -186,6 +187,23 @@
   end
 end
 
+function block:OnEnter()
+  if not InCombatLockdown() then
+    GameTooltip:SetOwner(self, "ANCHOR_BOTTOMRIGHT");
+    if self.currencyID then
+      GameTooltip:SetCurrencyTokenByID(self.currencyID);
+    else
+      GameTooltip:SetItemByID(self.itemID);
+    end
+    GameTooltip:Show();
+  end
+end
+function block:OnLeave()
+  if GameTooltip:IsOwned(self) then
+    GameTooltip_Hide()
+  end
+end
+
 function block:OnEvent(event, ...)
   print('|cFF0088FF<'..self.name..'>|r', 'OnEvent', event, ...)
   self:Update()