# HG changeset patch
# User Nenue
# Date 1496524814 14400
# Node ID b67ba10788249a9b148ca961c780a02c74b6a087
# Parent b2be2de2b1336f9d5a5ceda6cd7b14420e12ea0a
- Added some WorldMapFrame alterations to make the filter bar less obtrusive
diff -r b2be2de2b133 -r b67ba1078824 FilterBar.lua
--- 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)
diff -r b2be2de2b133 -r b67ba1078824 MapFrame.lua
--- a/MapFrame.lua Sun May 28 20:16:05 2017 -0400
+++ b/MapFrame.lua Sat Jun 03 17:20:14 2017 -0400
@@ -1,10 +1,11 @@
--
--- Created by IntelliJ IDEA.
--- User: Nick
--- Date: 5/24/2017
--- Time: 9:27 PM
--- To change this template use File | Settings | File Templates.
+-- WorldPlan
+-- Map Frame Customizations
--
+local _, db = ...
+local print = DEVIAN_WORKSPACE and function(...) print('MapFrame',...) end or nop
+local enableConfigLayers = false
+local regionLabels = {}
WorldPlanMapFrameMixin = {
defaults = {
@@ -23,14 +24,163 @@
function Module:OnLoad()
WorldPlan:AddHandler(self)
-
-
+ hooksecurefunc("WorldMap_ToggleSizeUp", function()
+ self:ApplySettings()
+ end)
+ hooksecurefunc("WorldMap_ToggleSizeDown", function()
+ self:ApplySettings()
+ end)
+ print('OnLoad()')
end
function Module:Setup()
+ print('Setup()')
self:ApplySettings()
+
+
+ --if not InCombatLockdown() then
+ --end
end
+
+
+db.CLTriggers.map = function(arg2)
+ WorldPlanMapFrame:ApplySettings()
+ if enableConfigLayers then
+ enableConfigLayers = false
+ db.print('Map Labels off')
+ else
+ enableConfigLayers = true
+ db.print('Map Labels on')
+ end
+ for m, label in pairs(regionLabels) do
+ print(m, label)
+ label:SetShown(enableConfigLayers)
+ end
+end
+
+local BORDER_COLOR = {0,0,0,1}
+local BORDER_INSET = 0
+local BORDER_WIDTH = 2
+local BORDER_INSET_WIDTH = BORDER_INSET+BORDER_WIDTH
+
+local GlobalRegions = {
+ [WorldMapFrameLeftBorder] = {
+ color = BORDER_COLOR,
+ w = BORDER_WIDTH,
+ [1] = {'TOPRIGHT', 'TOPLEFT', BORDER_INSET, 0},
+ [2] = {'BOTTOMRIGHT', 'BOTTOMRIGHT', BORDER_INSET_WIDTH, -BORDER_INSET }
+ },
+ [WorldMapFrameRightBorder] = {
+ color = BORDER_COLOR,
+ w = BORDER_WIDTH,
+ [1] = {'TOPLEFT', 'TOPRIGHT', BORDER_INSET,0 },
+ [2] = {'BOTTOMRIGHT', 'BOTTOMRIGHT', BORDER_INSET_WIDTH, -BORDER_INSET_WIDTH}
+ },
+ [WorldMapFrameTopBorder] = {
+ color = BORDER_COLOR,
+ h = BORDER_WIDTH,
+ [1] = {'BOTTOMRIGHT', 'TOPRIGHT', BORDER_INSET_WIDTH, 0},
+ [2] = {'BOTTOMLEFT', 'TOPLEFT', -(BORDER_INSET_WIDTH), 0}
+ },
+ [WorldMapFrameBottomBorder] = {
+ h = BORDER_WIDTH,
+ color = BORDER_COLOR,
+ [1] = {'TOPRIGHT', 'BOTTOMRIGHT', BORDER_INSET_WIDTH, -BORDER_INSET},
+ [2] = {'TOPLEFT', 'BOTTOMLEFT', -BORDER_INSET_WIDTH, -BORDER_INSET}
+ },
+ [WorldMapFrameBg] = {
+ color = BORDER_COLOR,
+ [1] = {'TOPLEFT', 'TOPLEFT', 0, 0},
+ [2] = {'BOTTOMRIGHT', 'BOTTOMRIGHT', 0, 0}
+ },
+ [WorldMapFrameNavBar] = {
+ [1] = {'TOPLEFT', 'TOPLEFT', 3, 0, WorldMapFrameBg},
+ [2] = {'TOPRIGHT', 'TOPRIGHT', -3, 0, WorldMapFrameBg}
+ },
+ [WorldMapTitleButton] = {
+ [1] = {'TOPLEFT', 'TOPLEFT', 0, 0, WorldMapFrameNavBarOverlay},
+ [2] = {'BOTTOMRIGHT', 'BOTTOMRIGHT', 0, 0, WorldMapFrameNavBarOverlay},
+ },
+
+ [WorldMapFrameBotLeftCorner] = { hidden = true},
+ [WorldMapFramePortraitFrame] = { hidden = true},
+ [WorldMapFramePortrait] = { hidden = true, },
+ [WorldMapFrameTutorialButton] = { hidden = true, },
+ [WorldMapFrameTopRightCorner] = {hidden = true},
+ [WorldMapFrameTopLeftCorner] = {hidden = true},
+ [WorldMapFrameBotLeftCorner] = {hidden = true},
+ [WorldMapFrameBotRightCorner] = {hidden = true},
+ [WorldMapFrameTopTileStreaks] = { hidden = true},
+ [WorldMapFrame.BorderFrame.ButtonFrameEdge] = { hidden = true},
+ [WW] = {hidden = true}
+}
+
+
+
function Module:ApplySettings()
+ print('ApplySettings()')
+
+ local regions = {WorldMapFrame.BorderFrame:GetRegions() }
+ local r,g,b,a = 1,0,0,1
+ for name, region in pairs(regions) do
+ local fs = regionLabels[region]
+ if not fs then
+ --print(name, type(region), tostring(region), region:GetName())
+ fs = self:CreateFontString(nil, 'OVERLAY')
+ fs:SetFontObject(WorldPlanFont)
+ regionLabels[region] = fs
+ fs:SetPoint('TOPLEFT', region, 'TOPLEFT')
+ fs:SetShown(enableConfigLayers)
+ fs:SetText(tostring(region:GetName()))
+ end
+
+
+ if region.SetColorTexture then
+ region:SetColorTexture(r,g,b,a)
+ print('===', region.GetName and region:GetName() or tostring(region), string.format("|cFF%2X%2X%2X%f,%f,%f", r*255, g*255, b*255, r,g,b))
+ if g < 1 then
+ g = g + 0.25
+ elseif r > 0 then
+ r = r - 0.25
+ elseif b < 1 then
+ b = b + .25
+ end
+ end
+
+ end
+
+ for region, data in pairs(GlobalRegions) do
+ print(region, data)
+ if data.hidden then
+ region:SetShown(false)
+ else
+
+ if data.w then
+ print('width =', data.w)
+ region:SetWidth(data.w)
+ end
+ if data.h then
+ print('height =', data.h)
+ region:SetHeight(data.h)
+ end
+ if data.color then
+ print('color =', unpack(data.color))
+ region:SetColorTexture(unpack(data.color))
+ end
+
+ if #data >= 1 then
+ region:ClearAllPoints()
+ for i, point in ipairs(data) do
+ print(i)
+ if type(point) == 'table' then
+ print('point +=', unpack(point))
+ region:SetPoint(point[1], point[5] or region:GetParent(), point[2], point[3], point[4])
+ end
+ end
+ end
+ end
+
+ end
end
\ No newline at end of file
diff -r b2be2de2b133 -r b67ba1078824 MapFrame.xml
--- a/MapFrame.xml Sun May 28 20:16:05 2017 -0400
+++ b/MapFrame.xml Sat Jun 03 17:20:14 2017 -0400
@@ -2,10 +2,14 @@
..\FrameXML\UI.xsd">
-
+
+
+
+
+
diff -r b2be2de2b133 -r b67ba1078824 QuestPOI.lua
--- 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)
diff -r b2be2de2b133 -r b67ba1078824 WorldPlan.lua
--- a/WorldPlan.lua Sun May 28 20:16:05 2017 -0400
+++ b/WorldPlan.lua Sat Jun 03 17:20:14 2017 -0400
@@ -36,6 +36,66 @@
db.BountiesByQuestID = {}
db.BountiesByFactionID = {}
db.IgnoreTimers = {}
+db.CLTriggers = {
+ wq = function(arg2, extraArgs)
+ if arg2 and WorldPlanQuests[arg2] then
+ self:print('WorldPlanQuests:'..arg2..'()')
+ WorldPlanQuests[arg2](WorldPlanQuests)
+ else
+ self:print('WorldPlanQuests:Refresh(true)')
+ WorldPlanQuests:Refresh(true)
+ end
+ end,
+ flightmap = function(arg2, extraArgs)
+ if not extraArgs then
+ return
+ end
+
+ local val1, val2, val3 = extraArgs:match("(%S+)%s*(%S*)%s*(%S*)")
+ if arg2 == 'scale' then
+ if tonumber(val1) and tonumber(val2) and tonumber(val3) then
+ db.Config.FlightMapScalingLimits = {tonumber(val1), tonumber(val2), tonumber(val3)}
+ self:print('FlightMapFrame scaling limits updated:', unpack(db.Config.FlightMapScalingLimits))
+ else
+ self:print('FlightMapFrame scaling limits:', unpack(db.Config.FlightMapScalingLimits))
+ end
+ elseif arg2 == 'alpha' then
+
+ if tonumber(val1) and tonumber(val2) and tonumber(val3) then
+ db.Config.FlightMapAlphaLimits = {tonumber(val1), tonumber(val2), tonumber(val3)}
+ self:print('FlightMapFrame alpha limits updated:', unpack(db.Config.FlightMapAlphaLimits))
+ else
+ self:print('FlightMapFrame alpha limits:', unpack(db.Config.FlightMapAlphaLimits))
+ end
+ end
+
+ end,
+ filter = function(arg2)
+ if arg2 and WorldPlanSummary[arg2] then
+ self:print('WorldPlanSummary:'..arg2..'()')
+ WorldPlanSummary[arg2](WorldPlanSummary)
+ else
+ self:print('WorldPlanSummary:Refresh(true)')
+ WorldPlanSummary:Refresh(true)
+ end
+ end,
+ log = function()
+ if WorldPlanDebug:IsShown() then
+ WorldPlanDebug:SetShown(false)
+ else
+ WorldPlanDebug:SetShown(true)
+ end
+
+ end,
+ debug = function()
+
+ if WorldPlanData then
+ WorldPlanData.DebugEnabled = (not WorldPlanData.DebugEnabled)
+ self:print(WorldPlanData.DebugEnabled and "Debugger on." or "Debugger off.")
+ end
+ end
+}
+
-- default color templates
db.DefaultType = {
@@ -190,6 +250,31 @@
--]]
end
+local function Handler_UpdateFader(self, sinceLast, isActive)
+
+ if isActive then
+ self.toAlpha = 1
+ self.Backdrop:Show()
+ else
+ self.toAlpha = self.fadeOpacity
+ 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)
+end
function db.print(...)
for i = 1, select('#', ...) do
@@ -241,6 +326,7 @@
end
}
+
function WorldPlanCore:OnConfigUpdate()
for _, module in ipairs(db.OrderedModules) do
if module.OnConfigUpdate then
@@ -264,7 +350,7 @@
if frame.defaults then
db.DefaultConfig[frame:GetName()] = frame.defaults
end
-
+ frame.UpdateAlpha = Handler_UpdateFader
frame.owningFrame = self
else
@@ -511,54 +597,12 @@
+
SlashCmdList.WORLDPLAN = function(args)
local arg1, arg2, extraArgs = args:match("(%S+)%s*(%S*)%s*(.*)")
- if arg1 == 'wq' then
- if arg2 and WorldPlanQuests[arg2] then
- self:print('WorldPlanQuests:'..arg2..'()')
- WorldPlanQuests[arg2](WorldPlanQuests)
- elseif arg2 == 'flightscale' and extraArgs then
- local val1, val2, val3 = extraArgs:match("(%S+)%s*(%S*)%s*(%S*)")
- if tonumber(val1) and tonumber(val2) and tonumber(val3) then
- db.Config.FlightMapScalingLimits = {tonumber(val1), tonumber(val2), tonumber(val3)}
- self:print('FlightMapFrame scaling limits updated:', unpack(db.Config.FlightMapScalingLimits))
- else
- self:print('FlightMapFrame scaling limits:', unpack(db.Config.FlightMapScalingLimits))
- end
- elseif arg2 == 'flightalpha' and extraArgs then
- local val1, val2, val3 = extraArgs:match("(%S+)%s*(%S*)%s*(%S*)")
- if tonumber(val1) and tonumber(val2) and tonumber(val3) then
- db.Config.FlightMapAlphaLimits = {tonumber(val1), tonumber(val2), tonumber(val3)}
- self:print('FlightMapFrame alpha limits updated:', unpack(db.Config.FlightMapAlphaLimits))
- else
- self:print('FlightMapFrame alpha limits:', unpack(db.Config.FlightMapAlphaLimits))
- end
- else
-
- self:print('WorldPlanQuests:Refresh(true)')
- WorldPlanQuests:Refresh(true)
- end
- elseif arg1 == 'filter' then
- if arg2 and WorldPlanSummary[arg2] then
- self:print('WorldPlanSummary:'..arg2..'()')
- WorldPlanSummary[arg2](WorldPlanSummary)
- else
- self:print('WorldPlanSummary:Refresh(true)')
- WorldPlanSummary:Refresh(true)
- end
- elseif arg1 == 'log' then
- if WorldPlanDebug:IsShown() then
- WorldPlanDebug:SetShown(false)
- else
- WorldPlanDebug:SetShown(true)
- end
- elseif arg1 == 'debug' then
- if WorldPlanData then
- WorldPlanData.DebugEnabled = (not WorldPlanData.DebugEnabled)
- self:print(WorldPlanData.DebugEnabled and "Debugger on." or "Debugger off.")
- end
-
+ if db.CLTriggers[arg1] then
+ db.CLTriggers[arg1](arg2, extraArgs)
else
self:print('Refreshing data.')
self:Refresh(true)
diff -r b2be2de2b133 -r b67ba1078824 WorldQuests.lua
--- a/WorldQuests.lua Sun May 28 20:16:05 2017 -0400
+++ b/WorldQuests.lua Sat Jun 03 17:20:14 2017 -0400
@@ -553,6 +553,7 @@
elseif db.isBrokenIsle then
continentScanned = true
end
+ db.PinStrata = WorldMapFrame_InWindowedMode() and 'HIGH' or 'FULLSCREEN'
print('layoutDirty =',layoutDirty)
for index, info in pairs(taskInfo) do