diff FilterBar.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 b29b35cb8539
children a4dfdd4f1cf3
line wrap: on
line diff
--- a/FilterBar.lua	Sun May 28 20:16:05 2017 -0400
+++ b/FilterBar.lua	Sat Jun 03 17:20:14 2017 -0400
@@ -87,7 +87,9 @@
 }
 local defaults = {}
 
-WorldPlanSummaryMixin = WorldPlanSummaryMixin or {}
+WorldPlanSummaryMixin =  {
+  fadeOpacity = 1,
+}
 local Module = WorldPlanSummaryMixin
 Module.selectedBountyIndex = {}
 Module.bounties = {}
@@ -144,29 +146,7 @@
   end
 
   barMouseOver = self:IsMouseOver()
-  if barMouseOver or filtersUsed then
-
-    self.toAlpha = 1
-    self.Backdrop:Show()
-  else
-    self.toAlpha = 0.25
-    self.Backdrop:Hide()
-  end
-  local cAlpha = self:GetAlpha()
-  if cAlpha ~= self.toAlpha then
-    if cAlpha > self.toAlpha then
-      cAlpha = cAlpha - sinceLast*4
-      if cAlpha <= self.toAlpha then
-        cAlpha = self.toAlpha
-      end
-    else
-      cAlpha = cAlpha + sinceLast*4
-      if cAlpha >= self.toAlpha then
-        cAlpha = self.toAlpha
-      end
-    end
-  end
-  self:SetAlpha(cAlpha)
+  self:UpdateAlpha(sinceLast, barMouseOver)
 end
 
 function Module:OnMapInfo(isBrokenIsle, isZoomedOut, mapAreaID, isNewMap, isMapOpen)
@@ -418,7 +398,7 @@
 
   self:SetSize(layoutWidth, BUTTONS_HEIGHT + (BUTTONS_SPACING * 2))
   self:ClearAllPoints()
-  self:SetPoint('BOTTOM')
+  self:SetPoint('TOPLEFT', WorldMapFrameNavBar, 'BOTTOMLEFT', 0, -3)
   self.isStale = nil
   layoutDirty = nil
 end
@@ -432,6 +412,7 @@
 function Pin:OnEnter()
   if #self.GlobalMatches >= 1 then
     GameTooltip:SetOwner(self, 'ANCHOR_BOTTOMRIGHT')
+    GameTooltip:AddLine(headerNames[self.info.filterKey])
     GameTooltip:AddLine(self.info.label)
     wipe(found)