comparison QuestPOI.lua @ 108:b67ba1078824

- Added some WorldMapFrame alterations to make the filter bar less obtrusive
author Nenue
date Sat, 03 Jun 2017 17:20:14 -0400
parents 9f664a0ef8a8
children caa482329919
comparison
equal deleted inserted replaced
107:b2be2de2b133 108:b67ba1078824
93 iconWidth = 18, 93 iconWidth = 18,
94 borderWidth = 2, 94 borderWidth = 2,
95 highlightWidth = 2, 95 highlightWidth = 2,
96 TagSize = 8, 96 TagSize = 8,
97 maxAlertLevel = 3, 97 maxAlertLevel = 3,
98 numberFontObject = 'WorldPlanFont' 98 numberFontObject = 'WorldPlanFont',
99 showTime = true,
99 } 100 }
100 local MINIMIZED_STYLE = { 101 local MINIMIZED_STYLE = {
101 hideNumber = true, 102 hideNumber = true,
102 hideIcon = true, 103 hideIcon = true,
104 showTime = false,
103 iconWidth = 3, 105 iconWidth = 3,
106 maxAlertLevel = 0,
104 } 107 }
105 local REWARD_TYPE_STYLES = { 108 local REWARD_TYPE_STYLES = {
106 [REWARD_CASH] = { 109 [REWARD_CASH] = {
107 hideNumber = true, 110 hideNumber = true,
108 }, 111 },
784 end 787 end
785 788
786 if owner then 789 if owner then
787 self:SetParent(owner) 790 self:SetParent(owner)
788 self.Overlay:SetParent(owner) 791 self.Overlay:SetParent(owner)
789 self:SetFrameStrata('HIGH') 792 --self:SetFrameStrata('HIGH')
790 self:SetFrameLevel(pinBaseIndex + self:GetID()) 793 self:SetFrameLevel(pinBaseIndex + self:GetID())
791 self.Overlay:SetFrameStrata('HIGH') 794 --self.Overlay:SetFrameStrata('HIGH')
792 self.Overlay:SetFrameLevel(overlayBaseIndex + self:GetID()) 795 self.Overlay:SetFrameLevel(overlayBaseIndex + self:GetID())
793 self.isStale = true 796 self.isStale = true
794 else 797 else
795 owner = self:GetParent() 798 owner = self:GetParent()
796 end 799 end
800
801 self:SetFrameStrata(db.PinStrata)
802 self.Overlay:SetFrameStrata(db.PinStrata)
797 803
798 804
799 if scaleFactor then 805 if scaleFactor then
800 print('scaleFactor') 806 print('scaleFactor')
801 self:SetScale(scaleFactor) 807 self:SetScale(scaleFactor)
942 local currentWidth = style.iconWidth or DEFAULT_STYLE.iconWidth 948 local currentWidth = style.iconWidth or DEFAULT_STYLE.iconWidth
943 local borderWidth = style.borderWidth or DEFAULT_STYLE.borderWidth 949 local borderWidth = style.borderWidth or DEFAULT_STYLE.borderWidth
944 local highlightWidth = style.highlightWidth or DEFAULT_STYLE.highlightWidth 950 local highlightWidth = style.highlightWidth or DEFAULT_STYLE.highlightWidth
945 local tagSize = style.TagSize or DEFAULT_STYLE.TagSize 951 local tagSize = style.TagSize or DEFAULT_STYLE.TagSize
946 local hideIcon = style.hideIcon or DEFAULT_STYLE.hideIcon 952 local hideIcon = style.hideIcon or DEFAULT_STYLE.hideIcon
953 local showtime = style.showTime or DEFAULT_STYLE.showTime
947 local borderColor = style.border or DEFAULT_STYLE.border 954 local borderColor = style.border or DEFAULT_STYLE.border
948 local textColor = style.textColor or DEFAULT_STYLE.textColor 955 local textColor = style.textColor or DEFAULT_STYLE.textColor
949 local questID = self.questID 956 local questID = self.questID
950 local iconBorder = self.RewardBorder 957 local iconBorder = self.RewardBorder
951 local trackingBorder = self.HighlightBorder 958 local trackingBorder = self.HighlightBorder
952 local icon = self.icon 959 local icon = self.icon
953 local count = self.count 960 local count = self.count
954 local hideNumbers = style.hideNumber or DEFAULT_STYLE.hideNumber 961 local hideNumbers = style.hideNumber or DEFAULT_STYLE.hideNumber
962 self.showTime = (style.showTime ~= nil) and style.showTime or DEFAULT_STYLE.showTime
955 963
956 964
957 local tagIcon = self.tagIcon 965 local tagIcon = self.tagIcon
958 self.maxAlertLevel = style.maxAlertLevel or DEFAULT_STYLE.maxAlertLevel 966 self.maxAlertLevel = style.maxAlertLevel or DEFAULT_STYLE.maxAlertLevel
959 967
1063 else 1071 else
1064 print('is nothing') 1072 print('is nothing')
1065 iconBorder:SetVertexColor(unpack(borderColor)) 1073 iconBorder:SetVertexColor(unpack(borderColor))
1066 trackingBorder:SetVertexColor(0,0,0,.5) 1074 trackingBorder:SetVertexColor(0,0,0,.5)
1067 end 1075 end
1076
1077 self.timeLabel:SetShown(style.showTime)
1068 self:UpdateStatus() 1078 self:UpdateStatus()
1069 1079
1070 if SpellCanTargetQuest() then 1080 if SpellCanTargetQuest() then
1071 if self.isSpellTarget then 1081 if self.isSpellTarget then
1072 icon:SetVertexColor(1,1,1) 1082 icon:SetVertexColor(1,1,1)
1106 self.timeLabel:SetText(text) 1116 self.timeLabel:SetText(text)
1107 end 1117 end
1108 end 1118 end
1109 1119
1110 self.alertLevel = tl 1120 self.alertLevel = tl
1111 self.timeLabel:SetShown(self.worldQuest and (self.maxAlertLevel >= 1)) 1121 self.timeLabel:SetShown(self.worldQuest and (self.maxAlertLevel >= 1) and self.showTime)
1112 else 1122 else
1113 self.hideReason = "No longer active." 1123 self.hideReason = "No longer active."
1114 self:HideOrShowFrames(false) 1124 self:HideOrShowFrames(false)
1115 1125
1116 end 1126 end