Mercurial > wow > buffalo2
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 110:73316951ce73 | 111:1196c2bad31c |
|---|---|
| 94 end | 94 end |
| 95 end | 95 end |
| 96 | 96 |
| 97 function VeneerWorldStateMixin:Update(isBatchUpdate) | 97 function VeneerWorldStateMixin:Update(isBatchUpdate) |
| 98 print('|cFFFFFF00All:Update()|r') | 98 print('|cFFFFFF00All:Update()|r') |
| 99 local canShow = false | |
| 99 for index, frame in ipairs(self.modules) do | 100 for index, frame in ipairs(self.modules) do |
| 100 if frame.Update then | 101 if frame.Update then |
| 101 print(' '..index..' |cFFFF00FFUpdate:|r '.. frame:GetName()) | 102 print(' '..index..' |cFFFF00FFUpdate:|r '.. frame:GetName()) |
| 102 frame:Update(isBatchUpdate) | 103 frame:Update(isBatchUpdate) |
| 103 print(' ', frame:IsVisible(), frame:IsShown()) | 104 print(' ', frame:IsVisible(), frame:IsShown()) |
| 104 end | 105 if frame:IsShown() then |
| 105 end | 106 canShow = true |
| 107 end | |
| 108 | |
| 109 end | |
| 110 end | |
| 111 self:SetShown(canShow) | |
| 106 end | 112 end |
| 107 | 113 |
| 108 function VeneerWorldStateMixin:OnShow() | 114 function VeneerWorldStateMixin:OnShow() |
| 109 print('OnShow()', debugstack()) | 115 print('OnShow()', debugstack()) |
| 110 end | 116 end |
| 228 } | 234 } |
| 229 local globalBountyInfo = { | 235 local globalBountyInfo = { |
| 230 } | 236 } |
| 231 function VeneerWorldStateCurrencyMixin:Update(isBatchUpdate) | 237 function VeneerWorldStateCurrencyMixin:Update(isBatchUpdate) |
| 232 local zoneText = GetRealZoneText() | 238 local zoneText = GetRealZoneText() |
| 239 local canShow = false | |
| 233 if zoneText then | 240 if zoneText then |
| 234 local currency = zoneCurrency[zoneText] | 241 local currency = zoneCurrency[zoneText] |
| 235 if currency then | 242 if currency then |
| 236 local name, earned, texture, earnedThisWeek, weeklyMax, totalMax = GetCurrencyInfo(zoneCurrency[zoneText]) | 243 local name, earned, texture, earnedThisWeek, weeklyMax, totalMax = GetCurrencyInfo(zoneCurrency[zoneText]) |
| 237 self.Icon:SetTexture(texture) | 244 self.Icon:SetTexture(texture) |
| 238 self.Label:SetFormattedText("%d / %d", earned, totalMax) | 245 self.Label:SetFormattedText("%d / %d", earned, totalMax) |
| 239 self:Show() | |
| 240 self:SetWidth(self.Icon:GetWidth() + self.Label:GetStringWidth() + 6) | 246 self:SetWidth(self.Icon:GetWidth() + self.Label:GetStringWidth() + 6) |
| 241 end | 247 canShow = true |
| 242 else | 248 end |
| 243 self:Hide() | 249 else |
| 244 end | 250 end |
| 251 self:SetShown(canShow) | |
| 252 VeneerWorldState:Reanchor(true) | |
| 245 end | 253 end |
| 246 | 254 |
| 247 function VeneerWorldStateProgressMixin:OnUpdate(sinceLast) | 255 function VeneerWorldStateProgressMixin:OnUpdate(sinceLast) |
| 248 self.timeLived = (self.timeLived or 0) + sinceLast | 256 self.timeLived = (self.timeLived or 0) + sinceLast |
| 249 if self.keepOpen then | 257 if self.keepOpen then |
