/
PP_oldMinimap, PP_oldDurabilityFrame, PP_oldVehicleSeatIndicator = nil |
local _G = _G |
local mover, moverText |
local wasIndoors |
local coordframe = CreateFrame("Frame", nil, Minimap) |
coordframe:SetHeight(28) --height of clock button |
coordframe:SetWidth(100) |
Minimap:SetScale(db.scale) --this says that the minimap is set to 90% scale |
Minimap:SetFrameStrata(db.strata) |
Minimap:SetFrameLevel(db.level) |
if db.mmAlpha < 1 and IsIndoors() then |
wasIndoors = true |
else |
--keep alpha of 1 while indoors - if mmAlpha is < 1, it will update when going outdoors |
Minimap:SetAlpha(db.mmAlpha) |
end |
Minimap:SetAlpha(db.mmAlpha) |
--ZONE TEXT |
MinimapZoneTextButton:SetParent("Minimap") |
}, |
mmAlpha = { |
name = "Minimap Alpha", |
desc = "Set the transparency of the minimap when outdoors. Does not take effect when indoors.", |
desc = "Set the transparency of the minimap.", |
type = "range", |
min = 0.05, |
max = 1, |
get = function() return db.mmAlpha end, |
set = function(_,value) |
db.mmAlpha = value |
if not IsIndoors() then |
Minimap:SetAlpha(value) |
else |
wasIndoors = true |
end |
if db.mmAlpha < 1 then |
PocketPlot:RegisterEvent("ZONE_CHANGED_INDOORS") |
PocketPlot:RegisterEvent("ZONE_CHANGED") |
else |
PocketPlot:RegisterEvent("ZONE_CHANGED_INDOORS") |
PocketPlot:RegisterEvent("ZONE_CHANGED") |
end |
Minimap:SetAlpha(value) |
end, |
order = 4, |
}, |
MapSetup() |
CoordPosition() |
if db.mmAlpha < 1 then |
PocketPlot:RegisterEvent("ZONE_CHANGED_INDOORS") |
PocketPlot:RegisterEvent("ZONE_CHANGED") |
end |
PlayerLogin = nil |
PocketPlot:UnregisterEvent("PLAYER_LOGIN") |
end |
--this is here instead of in the above function because Grid would throw some dumb error that shouldn't have been occuring, imo |
PocketPlot:RegisterEvent("PLAYER_LOGIN") |
PocketPlot:SetScript("OnEvent", function(self,event) |
if event == "PLAYER_LOGIN" then |
PlayerLogin() |
elseif event == "ZONE_CHANGED_INDOORS" then |
Minimap:SetAlpha(1) |
Minimap:SetZoom(1) |
Minimap:SetZoom(0) |
wasIndoors = true |
else --"ZONE_CHANGED" |
if wasIndoors then |
if not IsIndoors() then |
Minimap:SetAlpha(db.mmAlpha) |
wasIndoors = false |
end |
end |
end |
end) |
PocketPlot:SetScript("OnEvent", PlayerLogin) |
## Title: PocketPlot |
## Author: Seerah |
## Notes: Minimap customization |
## Version: 2.18.4 |
## Version: 2.18.3 |
## X-Category: Minimap |
## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets |
## SavedVariables: PocketPlotDB |
local DataVersion = 9001 -- dev version always overwrites everything else :) |
--@end-debug@]===] |
--@non-debug@ |
local DataVersion = 56 |
local DataVersion = 54 |
--@end-non-debug@ |
local AGSMW = LibStub:NewLibrary("AceGUISharedMediaWidgets-1.0", DataVersion) |
return -- already loaded and no upgrade necessary |
end |
LoadAddOn("LibSharedMedia-3.0") |
local AceGUI = LibStub("AceGUI-3.0") |
local Media = LibStub("LibSharedMedia-3.0") |