diff Modules/WorldState.lua @ 111:1196c2bad31c

- obtain World Quest AP via WorldPlan - artifact button text adjustments - removed from UISpecialFrames to fix hiding on map open
author Nick@Zahhak
date Tue, 21 Mar 2017 16:33:51 -0400
parents a41f6b74709a
children 7c77fde36287
line wrap: on
line diff
--- a/Modules/WorldState.lua	Mon Mar 06 02:31:15 2017 -0500
+++ b/Modules/WorldState.lua	Tue Mar 21 16:33:51 2017 -0400
@@ -96,13 +96,19 @@
 
 function VeneerWorldStateMixin:Update(isBatchUpdate)
   print('|cFFFFFF00All:Update()|r')
+  local canShow = false
   for index, frame in ipairs(self.modules) do
     if frame.Update then
       print('  '..index..' |cFFFF00FFUpdate:|r '.. frame:GetName())
       frame:Update(isBatchUpdate)
       print('    ', frame:IsVisible(), frame:IsShown())
+      if frame:IsShown() then
+        canShow = true
+      end
+
     end
   end
+  self:SetShown(canShow)
 end
 
 function VeneerWorldStateMixin:OnShow()
@@ -230,18 +236,20 @@
 }
 function VeneerWorldStateCurrencyMixin:Update(isBatchUpdate)
   local zoneText = GetRealZoneText()
+  local canShow = false
   if zoneText then
     local currency = zoneCurrency[zoneText]
     if currency then
       local name, earned, texture, earnedThisWeek, weeklyMax, totalMax = GetCurrencyInfo(zoneCurrency[zoneText])
       self.Icon:SetTexture(texture)
       self.Label:SetFormattedText("%d / %d", earned, totalMax)
-      self:Show()
       self:SetWidth(self.Icon:GetWidth() + self.Label:GetStringWidth() + 6)
+      canShow = true
     end
   else
-    self:Hide()
   end
+  self:SetShown(canShow)
+  VeneerWorldState:Reanchor(true)
 end
 
 function VeneerWorldStateProgressMixin:OnUpdate(sinceLast)