Mercurial > wow > worldplan
comparison ClassPlan.lua @ 104:a3800989f515
- Solved the quest pins remaining visible issue
| author | Nenue |
|---|---|
| date | Sun, 28 May 2017 19:53:11 -0400 |
| parents | b29b35cb8539 |
| children | 9f664a0ef8a8 |
comparison
equal
deleted
inserted
replaced
| 103:8cdd62e7a224 | 104:a3800989f515 |
|---|---|
| 99 self:Toggle() | 99 self:Toggle() |
| 100 else | 100 else |
| 101 originalScript(minimap, button) | 101 originalScript(minimap, button) |
| 102 end | 102 end |
| 103 end) | 103 end) |
| 104 local OnStopped = function() | |
| 105 print('Fade.OnStop()') | |
| 106 self.isAnimating = nil | |
| 107 self:SetShown(self.data.IsShown) | |
| 108 end | |
| 109 | |
| 110 self.FadeOut:SetScript('OnStop', OnStopped) | |
| 104 self.FadeOut:SetScript('OnFinished', function() | 111 self.FadeOut:SetScript('OnFinished', function() |
| 105 self:Hide() | 112 print('FadeOut.OnFinished()') |
| 106 self.data.IsShown = nil | |
| 107 self.isAnimating = nil | 113 self.isAnimating = nil |
| 114 self:SetShown(false) | |
| 108 end) | 115 end) |
| 109 self.FadeIn:SetScript('OnPlay', function() | 116 self.FadeIn:SetScript('OnPlay', function() |
| 117 print('FadeIn.OnPlay()') | |
| 110 self.isAnimating = true | 118 self.isAnimating = true |
| 111 self:SetShown(true) | 119 self.data.IsShown = true |
| 112 end) | 120 end) |
| 121 self.FadeIn:SetScript('OnStop', OnStopped) | |
| 113 | 122 |
| 114 --hooksecurefunc(C_Garrison, 'RequestLandingPageShipmentInfo', function() | 123 --hooksecurefunc(C_Garrison, 'RequestLandingPageShipmentInfo', function() |
| 115 -- WorldPlan:print("Requesting shipments data.") | 124 -- WorldPlan:print("Requesting shipments data.") |
| 116 --end) | 125 --end) |
| 117 C_Garrison.RequestLandingPageShipmentInfo(); | 126 C_Garrison.RequestLandingPageShipmentInfo(); |
| 301 self.isStale = nil | 310 self.isStale = nil |
| 302 end | 311 end |
| 303 | 312 |
| 304 | 313 |
| 305 function ClassPlan:Toggle() | 314 function ClassPlan:Toggle() |
| 306 if self:IsShown() then | 315 print('Toggle()', self:IsVisible(), self:IsShown()) |
| 316 if self:IsVisible() then | |
| 317 print('fade out') | |
| 318 self.data.IsShown = false | |
| 307 self.FadeOut:Play() | 319 self.FadeOut:Play() |
| 308 else | 320 else |
| 321 print('fade in') | |
| 309 self.data.IsShown = true | 322 self.data.IsShown = true |
| 323 self:SetShown(true) | |
| 310 self.FadeIn:Play() | 324 self.FadeIn:Play() |
| 311 end | 325 end |
| 312 end | 326 end |
| 313 | 327 |
| 314 | 328 |
| 340 self:Reanchor() | 354 self:Reanchor() |
| 341 end | 355 end |
| 342 | 356 |
| 343 function ClassPlan:OnHide() | 357 function ClassPlan:OnHide() |
| 344 print('|cFF00FFFFHide()') | 358 print('|cFF00FFFFHide()') |
| 359 self.isAnimating = nil | |
| 345 end | 360 end |
| 346 | 361 |
| 347 function ClassPlan:Reanchor() | 362 function ClassPlan:Reanchor() |
| 348 if not (self.data.positionX and self.data.positionY) then | 363 if not (self.data.positionX and self.data.positionY) then |
| 349 self.data.positionX = 0 | 364 self.data.positionX = 0 |
