Mercurial > wow > worldplan
comparison QuestPOI.lua @ 47:733785e306a3
- Fixed an update lag that occurs between map changes.
- Aesthetic polish
author | Nenue |
---|---|
date | Tue, 27 Dec 2016 17:29:23 -0500 |
parents | db570c6a0ffb |
children | c0b88bd1e40b |
comparison
equal
deleted
inserted
replaced
46:0873a1b00bb2 | 47:733785e306a3 |
---|---|
32 local PIN_REQUEST_DELAY = .2 | 32 local PIN_REQUEST_DELAY = .2 |
33 local ICON_UNKNOWN = "Interface\\ICONS\\inv_misc_questionmark" | 33 local ICON_UNKNOWN = "Interface\\ICONS\\inv_misc_questionmark" |
34 local ICON_MONEY = "Interface\\Buttons\\UI-GroupLoot-Coin-Up" | 34 local ICON_MONEY = "Interface\\Buttons\\UI-GroupLoot-Coin-Up" |
35 | 35 |
36 local WORLD_QUEST_BORDER = "Interface\\UNITPOWERBARALT\\Generic1Target_Circular_Frame" | 36 local WORLD_QUEST_BORDER = "Interface\\UNITPOWERBARALT\\Generic1Target_Circular_Frame" |
37 local PENDING_BORDER | 37 local PENDING_BORDER = "Interface\\BUTTONS\\YELLOWORANGE64" |
38 local PENDING_ICON = "Interface\\BUTTONS\\YELLOWORANGE64" | 38 local PENDING_ICON = "Interface\\BUTTONS\\YELLOWORANGE64" |
39 | 39 |
40 local REWARD_CASH = WORLD_QUEST_REWARD_TYPE_FLAG_GOLD | 40 local REWARD_CASH = WORLD_QUEST_REWARD_TYPE_FLAG_GOLD |
41 local REWARD_ARTIFACT_POWER = WORLD_QUEST_REWARD_TYPE_FLAG_ARTIFACT_POWER | 41 local REWARD_ARTIFACT_POWER = WORLD_QUEST_REWARD_TYPE_FLAG_ARTIFACT_POWER |
42 local REWARD_GEAR = WORLD_QUEST_REWARD_TYPE_FLAG_EQUIPMENT | 42 local REWARD_GEAR = WORLD_QUEST_REWARD_TYPE_FLAG_EQUIPMENT |
408 self:OnNew() | 408 self:OnNew() |
409 elseif not self.isAnimating then | 409 elseif not self.isAnimating then |
410 self:SetAlpha(1) -- fix stuck alpha | 410 self:SetAlpha(1) -- fix stuck alpha |
411 end | 411 end |
412 | 412 |
413 self.Overlay:SetShown(true) | |
414 --WorldPlan:print(self:GetAlpha()) | 413 --WorldPlan:print(self:GetAlpha()) |
415 | 414 |
416 end | 415 end |
417 function QuestPOI:OnHide() | 416 function QuestPOI:OnHide() |
418 --qprint('|cFFFFFF00["'..tostring(self.title)..'"]|r:OnHide()') | 417 --qprint('|cFFFFFF00["'..tostring(self.title)..'"]|r:OnHide()') |
570 | 569 |
571 | 570 |
572 end | 571 end |
573 icon:SetMask("Interface\\Minimap\\UI-Minimap-Background") | 572 icon:SetMask("Interface\\Minimap\\UI-Minimap-Background") |
574 if self.itemTexture then | 573 if self.itemTexture then |
575 iconBorder:SetTexture(WORLD_QUEST_BORDER) | 574 --iconBorder:SetTexture(WORLD_QUEST_BORDER) |
576 | 575 |
577 if self.NoIcon then | 576 if self.NoIcon then |
578 icon:SetTexture(PENDING_ICON) | 577 icon:SetTexture(PENDING_ICON) |
579 icon:SetDesaturated(true) | 578 icon:SetDesaturated(true) |
580 icon:SetVertexColor(style.r, style.g, style.b, style.a) | 579 icon:SetVertexColor(style.r, style.g, style.b) |
581 else | 580 else |
582 | 581 |
583 icon:SetTexture(self.itemTexture) | 582 icon:SetTexture(self.itemTexture) |
584 icon:SetDesaturated(false) | 583 icon:SetDesaturated(false) |
585 icon:SetVertexColor(1, 1, 1) | 584 icon:SetVertexColor(1, 1, 1) |
586 end | 585 end |
587 else | 586 else |
588 iconBorder:SetTexture(PENDING_BORDER) | 587 -- |
589 icon:SetTexture(PENDING_ICON) | 588 icon:SetTexture(PENDING_ICON) |
590 icon:SetDesaturated(true) | 589 icon:SetDesaturated(true) |
591 icon:SetVertexColor(style.r, style.g, style.b, style.a) | 590 icon:SetVertexColor(style.r, style.g, style.b) |
592 end | 591 end |
593 | 592 |
594 local borderStyle = style | 593 local borderStyle = style |
595 if self.rarity and WORLD_QUEST_QUALITY_COLORS[self.rarity] then | 594 iconBorder:SetMask("Interface\\Minimap\\UI-Minimap-Background") |
596 borderStyle = WORLD_QUEST_QUALITY_COLORS[self.rarity] | 595 iconBorder:SetTexture(PENDING_BORDER) |
597 end | |
598 | 596 |
599 iconBorder:SetVertexColor(borderStyle.r, borderStyle.g, borderStyle.b, 1) | 597 iconBorder:SetVertexColor(borderStyle.r, borderStyle.g, borderStyle.b, 1) |
600 iconBorder:SetDesaturated(true) | 598 iconBorder:SetDesaturated(true) |
601 iconBorder:SetAlpha(subStyle.alpha or 1) | 599 iconBorder:SetAlpha(subStyle.alpha or 1) |
602 | 600 |
603 if questID == GetSuperTrackedQuestID() then | 601 trackingBorder:SetMask("Interface\\Minimap\\UI-Minimap-Background") |
604 trackingBorder:SetVertexColor(0,0,0,1) | 602 trackingBorder:SetTexture(PENDING_BORDER) |
605 else | 603 trackingBorder:SetVertexColor(0,0,0,1) |
606 trackingBorder:SetVertexColor(0,0,0,0.5) | |
607 end | |
608 | 604 |
609 self.tagIcon:SetShown(self.tagSize and true or false) | 605 self.tagIcon:SetShown(self.tagSize and true or false) |
610 self.tagIcon:SetAtlas(self.tagAtlas) | 606 self.tagIcon:SetAtlas(self.tagAtlas) |
611 self.tagIcon:SetAlpha(subStyle.alpha or 1) | 607 self.tagIcon:SetAlpha(subStyle.alpha or 1) |
612 self.EliteBorder:SetShown(self.isElite and not self.filtered) | 608 self.Overlay:SetShown(true) |
613 self.Overlay:SetShown(self:IsShown()) | 609 self.Overlay:ClearAllPoints(self) |
614 self.Overlay:SetParent(self:GetParent()) | 610 self.Overlay:SetParent(self:GetParent()) |
615 self.Overlay:SetFrameLevel(self:GetFrameLevel()+200) | 611 self.Overlay:SetFrameLevel(self:GetFrameLevel()+200) |
616 self.Overlay:SetAllPoints(self) | 612 self.Overlay:SetPoint('TOPLEFT', self, 'TOPLEFT', 0, 4) |
613 self.Overlay:SetPoint('BOTTOMRIGHT', self, 'BOTTOMRIGHT', 0, -4) | |
614 self.EliteBorder:SetShown(self.isElite and not self.filtered) | |
617 | 615 |
618 | 616 |
619 self:UpdateSize() | 617 self:UpdateSize() |
620 self.isStale = nil | 618 self.isStale = nil |
621 end | 619 end |
682 local tag = self.tagIcon | 680 local tag = self.tagIcon |
683 | 681 |
684 local iconWidth = subStyle.iconWidth | 682 local iconWidth = subStyle.iconWidth |
685 local borderWidth = iconWidth + (subStyle.borderWidth * 2) | 683 local borderWidth = iconWidth + (subStyle.borderWidth * 2) |
686 local highlightWidth = borderWidth + (subStyle.highlightWidth * 2) | 684 local highlightWidth = borderWidth + (subStyle.highlightWidth * 2) |
687 | |
688 local iconTexture = self.itemTexture | 685 local iconTexture = self.itemTexture |
689 | 686 |
687 | |
688 if self.questID == GetSuperTrackedQuestID() then | |
689 highlightWidth = highlightWidth + 2 | |
690 end | |
691 | |
692 if self.rarity and WORLD_QUEST_QUALITY_COLORS[self.rarity] then | |
693 highlightWidth = highlightWidth + self.rarity | |
694 end | |
690 self.tagIcon:SetSize(self.tagSize, self.tagSize) | 695 self.tagIcon:SetSize(self.tagSize, self.tagSize) |
691 self:SetSize(iconWidth, iconWidth) | 696 self:SetSize(iconWidth, iconWidth) |
692 icon:SetSize(iconWidth, iconWidth) | 697 icon:SetSize(iconWidth, iconWidth) |
693 iconBorder:SetSize(borderWidth, borderWidth) | 698 iconBorder:SetSize(borderWidth, borderWidth) |
694 trackingBorder:SetSize(highlightWidth, highlightWidth) | 699 trackingBorder:SetSize(highlightWidth, highlightWidth) |