diff 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
line wrap: on
line diff
--- a/QuestPOI.lua	Sun May 28 20:16:05 2017 -0400
+++ b/QuestPOI.lua	Sat Jun 03 17:20:14 2017 -0400
@@ -95,12 +95,15 @@
   highlightWidth = 2,
   TagSize = 8,
   maxAlertLevel = 3,
-  numberFontObject = 'WorldPlanFont'
+  numberFontObject = 'WorldPlanFont',
+  showTime = true,
 }
 local MINIMIZED_STYLE = {
   hideNumber = true,
   hideIcon = true,
+  showTime = false,
   iconWidth = 3,
+  maxAlertLevel = 0,
 }
 local REWARD_TYPE_STYLES = {
   [REWARD_CASH] = {
@@ -786,15 +789,18 @@
   if owner then
     self:SetParent(owner)
     self.Overlay:SetParent(owner)
-    self:SetFrameStrata('HIGH')
+    --self:SetFrameStrata('HIGH')
     self:SetFrameLevel(pinBaseIndex + self:GetID())
-    self.Overlay:SetFrameStrata('HIGH')
+    --self.Overlay:SetFrameStrata('HIGH')
     self.Overlay:SetFrameLevel(overlayBaseIndex + self:GetID())
     self.isStale = true
   else
     owner = self:GetParent()
   end
 
+  self:SetFrameStrata(db.PinStrata)
+  self.Overlay:SetFrameStrata(db.PinStrata)
+
 
   if scaleFactor then
     print('scaleFactor')
@@ -944,6 +950,7 @@
   local highlightWidth = style.highlightWidth or DEFAULT_STYLE.highlightWidth
   local tagSize = style.TagSize or DEFAULT_STYLE.TagSize
   local hideIcon = style.hideIcon or DEFAULT_STYLE.hideIcon
+  local showtime = style.showTime or DEFAULT_STYLE.showTime
   local borderColor = style.border or DEFAULT_STYLE.border
   local textColor = style.textColor or DEFAULT_STYLE.textColor
   local questID = self.questID
@@ -952,6 +959,7 @@
   local icon = self.icon
   local count = self.count
   local hideNumbers = style.hideNumber or DEFAULT_STYLE.hideNumber
+  self.showTime = (style.showTime ~= nil) and style.showTime or DEFAULT_STYLE.showTime
 
 
   local tagIcon = self.tagIcon
@@ -1065,6 +1073,8 @@
     iconBorder:SetVertexColor(unpack(borderColor))
     trackingBorder:SetVertexColor(0,0,0,.5)
   end
+
+  self.timeLabel:SetShown(style.showTime)
   self:UpdateStatus()
 
   if SpellCanTargetQuest() then
@@ -1108,7 +1118,7 @@
     end
 
     self.alertLevel = tl
-    self.timeLabel:SetShown(self.worldQuest and (self.maxAlertLevel >= 1))
+    self.timeLabel:SetShown(self.worldQuest and (self.maxAlertLevel >= 1) and  self.showTime)
   else
     self.hideReason = "No longer active."
     self:HideOrShowFrames(false)