comparison ClassPlan.lua @ 102:4d1520186ea4

7.2.5 changes - Fixed order hall panel not initializing on fresh install
author Nenue
date Thu, 25 May 2017 17:24:00 -0400
parents b29b35cb8539
children 9f664a0ef8a8
comparison
equal deleted inserted replaced
101:b68af1e44bdc 102:4d1520186ea4
53 playerFirst = false, 53 playerFirst = false,
54 prototypes = {}, 54 prototypes = {},
55 Queued = {}, 55 Queued = {},
56 Timers = {}, 56 Timers = {},
57 ReportChunks = {}, 57 ReportChunks = {},
58 maxItems = 12
58 } 59 }
59 ClassPlanHandlerBase = { 60 ClassPlanHandlerBase = {
60 numBlocks = 0, 61 numBlocks = 0,
61 isStale = true, 62 isStale = true,
62 maxItems = 10 63 maxItems = 10
99 self:Toggle() 100 self:Toggle()
100 else 101 else
101 originalScript(minimap, button) 102 originalScript(minimap, button)
102 end 103 end
103 end) 104 end)
105 local OnStopped = function()
106 print('Fade.OnStop()')
107 self.isAnimating = nil
108 self:SetShown(self.data.IsShown)
109 end
110
111 self.FadeOut:SetScript('OnStop', OnStopped)
104 self.FadeOut:SetScript('OnFinished', function() 112 self.FadeOut:SetScript('OnFinished', function()
105 self:Hide() 113 print('FadeOut.OnFinished()')
106 self.data.IsShown = nil
107 self.isAnimating = nil 114 self.isAnimating = nil
115 self:SetShown(false)
108 end) 116 end)
109 self.FadeIn:SetScript('OnPlay', function() 117 self.FadeIn:SetScript('OnPlay', function()
118 print('FadeIn.OnPlay()')
110 self.isAnimating = true 119 self.isAnimating = true
111 self:SetShown(true) 120 self.data.IsShown = true
112 end) 121 end)
122 self.FadeIn:SetScript('OnStop', OnStopped)
113 123
114 --hooksecurefunc(C_Garrison, 'RequestLandingPageShipmentInfo', function() 124 --hooksecurefunc(C_Garrison, 'RequestLandingPageShipmentInfo', function()
115 -- WorldPlan:print("Requesting shipments data.") 125 -- WorldPlan:print("Requesting shipments data.")
116 --end) 126 --end)
117 C_Garrison.RequestLandingPageShipmentInfo(); 127 C_Garrison.RequestLandingPageShipmentInfo();
301 self.isStale = nil 311 self.isStale = nil
302 end 312 end
303 313
304 314
305 function ClassPlan:Toggle() 315 function ClassPlan:Toggle()
306 if self:IsShown() then 316 print('Toggle()', self:IsVisible(), self:IsShown())
317 if self:IsVisible() then
318 print('fade out')
319 self.data.IsShown = false
307 self.FadeOut:Play() 320 self.FadeOut:Play()
308 else 321 else
322 print('fade in')
309 self.data.IsShown = true 323 self.data.IsShown = true
324 self:SetShown(true)
310 self.FadeIn:Play() 325 self.FadeIn:Play()
311 end 326 end
312 end 327 end
313 328
314 329
340 self:Reanchor() 355 self:Reanchor()
341 end 356 end
342 357
343 function ClassPlan:OnHide() 358 function ClassPlan:OnHide()
344 print('|cFF00FFFFHide()') 359 print('|cFF00FFFFHide()')
360 self.isAnimating = nil
345 end 361 end
346 362
347 function ClassPlan:Reanchor() 363 function ClassPlan:Reanchor()
348 if not (self.data.positionX and self.data.positionY) then 364 if not (self.data.positionX and self.data.positionY) then
349 self.data.positionX = 0 365 self.data.positionX = 0