WoWInterface SVN PocketPlot

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 67 to Rev 66
    Reverse comparison

Rev 67 → Rev 66

PocketPlot/PocketPlot.toc
2,7 → 2,7
## Title: PocketPlot
## Author: Seerah
## Notes: Minimap customization
## Version: 2.12
## Version: 2.11.2
## X-Category: Minimap
## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets
## SavedVariables: PocketPlotDB
PocketPlot/media/PPblips comic.blp Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
PocketPlot/media/PPblips bigger.blp Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
PocketPlot/media/PPblips comic bigger.blp Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
PocketPlot/media/PPblips sharp.blp Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
PocketPlot/media/PPblips.blp Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
PocketPlot/media/default light.blp Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
PocketPlot/media/default soft.blp Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
PocketPlot/media/default sharp.blp Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
PocketPlot/media/PPblips3.blp Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes : Added: svn:mime-type + application/octet-stream
PocketPlot/media Property changes : Modified: svn:ignore - *.png *.psd OBJECTICONS.png OBJECTICONS2.png OBJECTICONS4.png PPblips.png PPblips2.png PPblips3 2.png PPblips3 bigger.png PPblips3 comic bigger.png PPblips3 comic.png PPblips3.png PPblips3.psd + PPblips.png PPblips2.png PPblips3.png PPblips3.psd
PocketPlot/pocketplot.lua
1,3 → 1,12
-------------------------------------------------------------------------------------------
-- WANT TO CHANGE THE STYLE OF THE MINIMAP BLIPS? --
-------------------------------------------------------------------------------------------
--file path to blip textures (2 styles are included with this addon, or you can find/create your own.)
--If you like the default blips instead, then use "Interface\\Minimap\\OBJECTICONS.blp"
 
local blips = "Interface\\AddOns\\PocketPlot\\media\\PPblips3.blp"
-------------------------------------------------------------------------------------------------------------------------------------
 
local PocketPlot = CreateFrame("Frame", nil, Minimap)
local LSM = LibStub("LibSharedMedia-3.0")
local widgetLists = AceGUIWidgetLSMlists
2,2 → 11,3
local fonts = widgetLists.font
--local fonts = LSM:List("font")
local class = select(2, UnitClass("player"))
13,9 → 23,9
local MiniMapVoiceChatFrame = MiniMapVoiceChatFrame
local MiniMapMeetingStoneFrame = MiniMapMeetingStoneFrame
local TimeManagerClockFrame = TimeManagerClockFrame
PP_oldMinimap, PP_oldDurabilityFrame, PP_oldVehicleSeatIndicator = nil
PP_oldMinimap, PP_oldDurabilityFrame, PP_oldVehicleSeatIndicator = nil --, PP_oldWatchFrame = nil
local _G = _G
local mover, moverText
local mover
local coordframe = CreateFrame("Frame", nil, Minimap)
coordframe:SetHeight(28) --height of clock button
coordframe:SetWidth(100)
53,20 → 63,9
["Flower"] = true,
}
local fontFlags = {"None", "Outline", "Thick Outline", "Monochrome"}
local blips = { "default",
"default light",
"default soft",
"default sharp",
"PPblips",
"PPblips sharp",
"PPblips bigger",
"PPblips comic",
"PPblips comic bigger",
}
 
local defaults = {
shape = "Square",
blips = "PPblips",
lsmfont = "Blue Highway",
fontFlag = "Outline",
zoneText = true,
136,6 → 135,12
local function SetPosition(frame)
if mover and mover:IsShown() then
local r,_,a,x,y = mover:GetPoint()
--frames lose their reference anchor frame when dragging... :/
if movershown == "Minimap" then
p = "UIParent"
else
p = "MinimapCluster"
end
db[frame] = {["r"]=r, ["p"]="UIParent",["a"]=a,["x"]=x,["y"]=y}
end
_G[frame]:ClearAllPoints()
150,6 → 155,7
end
 
local function MoveFrames(frame)
local moverText
if not mover then
mover = CreateFrame("Frame", nil, UIParent)
mover:SetBackdrop({bgFile ="Interface\\Buttons\\WHITE8x8",})
165,7 → 171,6
mover:SetScript("OnMouseUp", function() mover:StopMovingOrSizing() SetPosition(movershown) end)
end
if frame == "None" then
mover:SetScale(1)
mover:Hide()
mover:EnableMouse(0)
return
173,7 → 178,6
mover:Show()
moverText:SetText(frame)
mover:EnableMouse(1)
mover:SetScale(_G[frame]:GetScale())
mover:ClearAllPoints()
mover:SetAllPoints(frame)
end
206,11 → 210,7
end
 
--MINIMAP ICONS/BLIPS
if db.blips == "default" then
Minimap:SetBlipTexture("Interface\\Minimap\\OBJECTICONS")
else
Minimap:SetBlipTexture("Interface\\AddOns\\PocketPlot\\media\\"..db.blips)
end
Minimap:SetBlipTexture(blips) --custom texture for blips
 
--MAKE THE MINIMAP SQUARE WITH A THIN BORDER
MinimapBorder:Hide()
392,30 → 392,8
SetShape()
ClassColors()
end,
order = 1,
order = 0.1,
},
blips = {
name = "Tracking Blips",
desc = "Set the style of tracking blips (POI) on the minimap.",
type = "select",
values = blips,
get = function()
for k, v in pairs(blips) do
if db.blips == v then
return k
end
end
end,
set = function(_,key)
db.blips = blips[key]
if db.blips == "default" then
Minimap:SetBlipTexture("Interface\\Minimap\\OBJECTICONS")
else
Minimap:SetBlipTexture("Interface\\AddOns\\PocketPlot\\media\\"..db.blips)
end
end,
order = 2,
},
scale = {
name = "Minimap Scale",
desc = "Set the scale of the minimap.",
428,7 → 406,7
db.scale = value
Minimap:SetScale(value)
end,
order = 3,
order = 0.2,
},
mmAlpha = {
name = "Minimap Alpha",
442,8 → 420,19
db.mmAlpha = value
Minimap:SetAlpha(value)
end,
order = 4,
order = 0.25,
},
combHide = {
name = "Hide in Combat",
desc = "Hide the minimap when in combat.",
type = "toggle",
get = function() return db.combHide end,
set = function()
db.combHide = not db.combHide
CombatHide()
end,
order = 0.275,
},
strata = {
name = "Minimap Strata",
desc = "Set the strata of the minimap and how it layers with other elements in your interface.",
460,7 → 449,7
db.strata = stratae[key]
Minimap:SetFrameStrata(db.strata)
end,
order = 5,
order = 0.3,
},
level = {
name = "Strata Level",
474,23 → 463,12
db.level = value
Minimap:SetFrameLevel(db.level)
end,
order = 6,
order = 0.4,
},
combHide = {
name = "Hide in Combat",
desc = "Hide the minimap when in combat.",
type = "toggle",
get = function() return db.combHide end,
set = function()
db.combHide = not db.combHide
CombatHide()
end,
order = 7,
},
header1 = {
name = "Border options",
type = "header",
order = 8,
order = 0.5,
},
border = {
name = "Border Color",
503,7 → 481,7
db.bg.r,db.bg.g,db.bg.b = r,g,b
ClassColors()
end,
order = 9,
order = 1,
},
classbg = {
name = "Class colored border",
514,7 → 492,7
db.classbg = not db.classbg
ClassColors()
end,
order = 10,
order = 2,
},
insets = {
name = "Border size",
530,7 → 508,7
PocketPlot:SetHeight(dims + value)
PocketPlot:SetWidth(dims + value)
end,
order = 11,
order = 3,
},
alpha = {
name = "Border Alpha",
544,12 → 522,12
db.alpha = alpha
ClassColors()
end,
order = 12,
order = 3.5,
},
header2 = {
name = "Text options",
type = "header",
order = 13,
order = 5,
},
font = {
name = "Font",
566,7 → 544,7
MinimapZoneText:SetFont(LSM:Fetch("font", db.lsmfont), db.zoneSize, db.fontFlag)
coords:SetFont(LSM:Fetch("font",db.lsmfont), db.coordSize, db.fontFlag)
end,
order = 14,
order = 6,
},
fontFlag = {
name = "Font Flag",
586,7 → 564,7
MinimapZoneText:SetFont(LSM:Fetch("font", db.lsmfont), db.zoneSize, db.fontFlag)
coords:SetFont(LSM:Fetch("font",db.lsmfont), db.coordSize, db.fontFlag)
end,
order = 15,
order = 6.5,
},
zonesize = {
name = "Zone Text Size",
600,7 → 578,7
db.zoneSize = size
MinimapZoneText:SetFont(LSM:Fetch("font",db.lsmfont), db.zoneSize, db.fontFlag)
end,
order = 16,
order = 7,
},
clocksize = {
name = "Clock Text Size",
614,7 → 592,7
db.clockSize = size
clockTime:SetFont(LSM:Fetch("font",db.lsmfont), db.clockSize, db.fontFlag)
end,
order = 17,
order = 8,
},
coordsize = {
name = "Coords Text Size",
628,7 → 606,7
db.coordSize = size
coords:SetFont(LSM:Fetch("font",db.lsmfont), db.coordSize, db.fontFlag)
end,
order = 18,
order = 9,
},
classfont = {
name = "Class colored text",
639,7 → 617,7
db.classfont = not db.classfont
ClassColors()
end,
order = 19,
order = 10,
},
coords = {
name = "Display coords",
655,7 → 633,7
end
CoordPosition()
end,
order = 20,
order = 11,
},
clock = {
name = "Display clock",
671,7 → 649,7
end
CoordPosition()
end,
order = 21,
order = 11.5,
},
zoneText = {
name = "Display zone text",
686,7 → 664,7
MinimapZoneTextButton:Hide()
end
end,
order = 22,
order = 12,
},
top = {
name = "Clock/coords on top",
697,12 → 675,12
db.top = not db.top
CoordPosition()
end,
order = 23,
order = 13,
},
header3 = {
name = "Frame Locations",
type = "header",
order = 24,
order = 14,
},
movers = {
name = "Enable mover for...",
724,7 → 702,7
movershown = frames[frame]
MoveFrames(movershown)
end,
order = 25,
order = 15,
},
reset = {
name = "Restore Positions",
737,7 → 715,7
end
ReloadUI()
end,
order = 26,
order = 16,
},
nudgeL = {
name = "Left",
756,7 → 734,7
mover:ClearAllPoints()
mover:SetAllPoints(frame)
end,
order = 27,
order = 17,
},
nudgeR = {
name = "Right",
775,7 → 753,7
mover:ClearAllPoints()
mover:SetAllPoints(frame)
end,
order = 28,
order = 18,
},
nudgeU = {
name = "Up",
794,7 → 772,7
mover:ClearAllPoints()
mover:SetAllPoints(frame)
end,
order = 29,
order = 19,
},
nudgeD = {
name = "Down",
813,17 → 791,17
mover:ClearAllPoints()
mover:SetAllPoints(frame)
end,
order = 30,
order = 20,
},
div3 = {
name = " ",
type = "description",
order = 31,
order = 21,
},
header4 = {
name = "Profile",
type = "header",
order = 32,
order = 22,
},
charSpec = {
name = "Character specific settings",
836,7 → 814,7
PocketPlotPCDB.charSpec = not PocketPlotPCDB.charSpec
ReloadUI()
end,
order = 33,
order = 23,
},
copyProfile = {
name = "Copy from Default",
849,7 → 827,7
PocketPlotPCDB.charSpec = true
ReloadUI()
end,
order = 34,
order = 24,
},
resetProfile = {
name = "Profile Reset",
864,7 → 842,7
end
ReloadUI()
end,
order = 35,
order = 25,
},
},
}
916,16 → 894,17
coordframe:SetScript("OnMouseUp", function()
if IsShiftKeyDown() then
ChatFrame1EditBox:Insert("["..coords:GetText().."]")
elseif WorldMapFrame:IsShown() then
WorldMapFrame:Hide()
else
ToggleFrame(WorldMapFrame)
WorldMapFrame:Show()
end
end)
local throttle = 0
local coordx, coordy
coordframe:SetScript("OnUpdate", function(self, elapsed)
throttle = throttle + elapsed
if throttle >= .3 then
coordx,coordy = GetPlayerMapPosition("player")
local coordx,coordy = GetPlayerMapPosition("player")
coords:SetFormattedText("%.1f/%.1f", coordx*100, coordy*100)
throttle = 0
end