diff Modules/BuffFrame.lua @ 80:bb6b532c5d2f

- added "world state" frame for zone-specific currencies and context-based artifact/experience progress
author Nenue
date Tue, 11 Oct 2016 08:03:41 -0400
parents 0784b87f9722
children 16b300d96724
line wrap: on
line diff
--- a/Modules/BuffFrame.lua	Sun Sep 11 18:46:30 2016 -0400
+++ b/Modules/BuffFrame.lua	Tue Oct 11 08:03:41 2016 -0400
@@ -95,6 +95,8 @@
     veneer.count:SetFontObject(VeneerNumberFont)
     veneer.count:ClearAllPoints()
     veneer.count:SetPoint('TOPRIGHT', veneer, 'TOPRIGHT', -3, -3)
+    veneer.count:SetJustifyH('RIGHT')
+    veneer.count:SetSize(30,30)
 
     veneer.underlay:SetParent(UIParent)
     veneer.underlay:SetFrameStrata('BACKGROUND')
@@ -177,11 +179,8 @@
       for i = 1, n do
         print(i, veneer.count:GetPoint(n))
       end
-      veneer.count.isUpdating = true
-      self:Hide()
       veneer.count:Show()
       veneer.count:SetText(text)
-      veneer.count.isUpdating = false
     end)
     hooksecurefunc(count, 'Hide', function(self)
       if veneer.count.isUpdating then
@@ -342,11 +341,7 @@
       buff:ClearAllPoints()
       if mod(numBuffs,BUFFS_PER_ROW) == 1 then
         if numBuffs == 1 then
-          if OrderHallCommandBar and OrderHallCommandBar:IsVisible() then
-            buff:SetPoint('TOPRIGHT', OrderHallCommandBar, 'BOTTOMRIGHT', BUFF_FRAMES_X, BUFF_FRAMES_Y)
-          else
-            buff:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', BUFF_FRAMES_X, BUFF_FRAMES_Y)
-          end
+          buff:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', BUFF_FRAMES_X, BUFF_FRAMES_Y)
           plugin.currentTop = buff:GetTop()
         else
           buff:SetPoint('TOPRIGHT', topBuff, 'BOTTOMRIGHT', 0, -BUFF_BUTTON_SPACING_V)
@@ -473,9 +468,25 @@
 
 end
 
+local OrderHallCommandBarMod = CreateFrame('Frame')
+function OrderHallCommandBarMod:Refresh()
+  OrderHallCommandBar.Background:SetAlpha(0.5)
+  OrderHallCommandBar:ClearAllPoints()
+  OrderHallCommandBar:SetPoint('TOP')
+  OrderHallCommandBar:SetWidth(580)
+end
+function OrderHallCommandBarMod:Setup()
+  if OrderHallCommandBar then
+    print('mapping orderhall bar')
+    hooksecurefunc(OrderHallCommandBar, 'Show', OrderHallCommandBarMod.Refresh)
+    self:Refresh()
+    self:UnregisterEvent('ADDON_LOADED')
+  else
+    self:RegisterEvent('ADDON_LOADED')
+    self:SetScript('OnEvent', OrderHallCommandBarMod.Setup)
+  end
+end
 plugin.init = function ()
-
-
-
   plugin.db = vn.db[PLUGIN_NAME]
+  OrderHallCommandBarMod:Setup()
 end
\ No newline at end of file