comparison QuestPOI.lua @ 60:3d8e83ddf603

- hide text regions directly when their associated pin has been removed from the map
author Nick@Zahhak
date Wed, 08 Feb 2017 05:58:56 -0500
parents bc09961d5a98
children a133ee697ca2
comparison
equal deleted inserted replaced
59:bc09961d5a98 60:3d8e83ddf603
428 428
429 if not self.isAnimating then 429 if not self.isAnimating then
430 self:SetAlpha(db.PinAlpha) -- fix stuck alpha 430 self:SetAlpha(db.PinAlpha) -- fix stuck alpha
431 end 431 end
432 if self.used then 432 if self.used then
433 self.Overlay:Show() 433 self.Overlay:SetShown(true)
434 end 434 end
435 435
436 end 436 end
437 function QuestPOI:OnHide() 437 function QuestPOI:OnHide()
438 qprint('|cFFFFFF00'..self:GetID()..'r:OnHide()') 438 --DEFAULT_CHAT_FRAME:AddMessage('|cFFFFFF00'..self:GetName()..'|r:OnHide()')
439 self.Overlay:SetShown(false)
439 440
440 -- reset flags 441 -- reset flags
441 self:SetAlpha(db.PinAlpha) 442 self:SetAlpha(db.PinAlpha)
442 self.isAnimating = nil 443 self.isAnimating = nil
443 self.isStale = true
444 self.Overlay:Hide()
445 end 444 end
446 445
447 -- different from owningFrame 446 -- different from owningFrame
448 function QuestPOI:SetAnchor(owner, dX, dY, mapWidth, mapHeight) 447 function QuestPOI:SetAnchor(owner, dX, dY, mapWidth, mapHeight)
449 wqprint(self:GetName()..':SetAnchor', self.filtered, self.used) 448 wqprint(self:GetName()..':SetAnchor', self.filtered, self.used)
558 self.HighlightBorder:SetVertexColor(.25,.5,1,1) 557 self.HighlightBorder:SetVertexColor(.25,.5,1,1)
559 else 558 else
560 self.HighlightBorder:SetVertexColor(0,0,0,0.7) 559 self.HighlightBorder:SetVertexColor(0,0,0,0.7)
561 end 560 end
562 self.alertLevel = tl 561 self.alertLevel = tl
562 self.timeLabel:SetShown(self.worldQuest and (self.maxAlertLevel >= 1))
563 else 563 else
564 WorldPlan:print('|cFFFFFF00'..tostring(self.title).. '|r is no longer active.') 564 if not self.completed then
565 self:Hide() 565 self.completed = true
566 end 566 WorldPlan:print('|cFFFFFF00'..tostring(self.title).. '|r is no longer active.')
567 self.timeLabel:SetShown(self.worldQuest and (self.maxAlertLevel >= 1)) 567 self:SetShown(false)
568 end 568 self.Overlay:SetShown(false)
569 569 end
570 function QuestPOI:Refresh (fromUser) 570
571 571 end
572 rprint('|c'..(fromUser and 'FF0088FF' or 'FF00FF88' )..self:GetID()..'|r:Refresh() type =', self.rewardType, 'title =', self.title) 572 end
573
574 function QuestPOI:Refresh ()
575
576 rprint('|cFF00FF88'..self:GetID()..'|r:Refresh() type =', self.rewardType, 'title =', self.title)
573 577
574 578
575 579
576 local styleType = (self.isPending and STYLE_TYPE_PENDING) or self.rewardType 580 local styleType = (self.isPending and STYLE_TYPE_PENDING) or self.rewardType
577 local style,subStyle = self:GetTypeInfo(self.rewardType) 581 local style,subStyle = self:GetTypeInfo(self.rewardType)