WoWInterface SVN PocketPlot

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk/PocketPlot
    from Rev 61 to Rev 60
    Reverse comparison

Rev 61 → Rev 60

pocketplot.lua
4,14 → 4,12
--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 blips = "Interface\\AddOns\\PocketPlot\\media\\PPblips2.blp"
-------------------------------------------------------------------------------------------------------------------------------------
 
local PocketPlot = CreateFrame("Frame", nil, Minimap)
local LSM = LibStub("LibSharedMedia-3.0")
local widgetLists = AceGUIWidgetLSMlists
local fonts = widgetLists.font
--local fonts = LSM:List("font")
local fonts = LSM:List("font")
local class = select(2, UnitClass("player"))
local classColor, movershown, clockFrame, clockTime, db, options
local Minimap = Minimap
22,7 → 20,6
local MiniMapMailFrame = MiniMapMailFrame
local MiniMapVoiceChatFrame = MiniMapVoiceChatFrame
local MiniMapMeetingStoneFrame = MiniMapMeetingStoneFrame
local TimeManagerClockFrame = TimeManagerClockFrame
PP_oldMinimap, PP_oldDurabilityFrame, PP_oldVehicleSeatIndicator = nil --, PP_oldWatchFrame = nil
local _G = _G
local mover = CreateFrame("Frame", nil, UIParent)
36,7 → 33,7
moverText:SetPoint("CENTER")
local coordframe = CreateFrame("Frame", nil, Minimap)
coordframe:SetHeight(28) --height of clock button
coordframe:SetWidth(100)
coordframe:SetWidth(60) --width of clock button
coordframe:EnableMouse(true)
local coords = coordframe:CreateFontString(nil, "OVERLAY")
coords:SetParent(coordframe)
66,7 → 63,6
alpha = 1,
top = false,
coords = true,
clock = true,
coordSize = 16,
classbg = false,
classfont = false,
211,10 → 207,6
clockFrame, clockTime = TimeManagerClockButton:GetRegions()
clockFrame:Hide()
clockTime:SetFont(LSM:Fetch("font", db.lsmfont), db.clockSize, db.fontFlag)
clockTime:SetAllPoints(TimeManagerClockButton)
if not db.clock then --toggle the clock, since CVar is removed in 4.0
TimeManagerClockButton:Hide()
end
 
--CALENDAR BUTTON/FRAME
GameTimeFrame:SetAlpha(0) --calendar button (old day/night indicator) --Set alpha to 0 so that it's still hidden, but we'll see the ? flash for new invites
282,8 → 274,9
--thanks, Elviswind, for shadow code to match clock
coords:SetShadowOffset(1,-1)
coords:SetShadowColor(0,0,0,1)
coords:SetAllPoints(coordframe)
if not db.coords then
if db.coords then
coordframe:Show()
else
coordframe:Hide()
end
 
292,38 → 285,35
end
 
local function CoordPosition()
local clockshown = db.clock
local coordshown = db.coords
local clockshown = TimeManagerClockButton:IsShown()
local coordshown = coordframe:IsShown()
TimeManagerClockButton:ClearAllPoints()
coords:ClearAllPoints()
coordframe:ClearAllPoints()
if not db.top then
if clockshown and not coordshown then
TimeManagerClockButton:SetPoint("TOP", Minimap, "BOTTOM", 0, 0)
clockTime:SetJustifyH("CENTER")
end
if coordshown and not clockshown then
coords:SetJustifyH("CENTER")
coords:SetPoint("CENTER")
coordframe:SetPoint("TOP", Minimap, "BOTTOM", 0, 0)
end
if clockshown and coordshown then
TimeManagerClockButton:SetPoint("TOPLEFT", Minimap, "BOTTOMLEFT", 2, 0)
clockTime:SetJustifyH("LEFT")
coords:SetJustifyH("RIGHT")
TimeManagerClockButton:SetPoint("TOPLEFT", Minimap, "BOTTOMLEFT", -10, 0)
coords:SetPoint("RIGHT")
coordframe:SetPoint("TOPRIGHT", Minimap, "BOTTOMRIGHT", 0, 0)
end
else
if clockshown and not coordshown then
TimeManagerClockButton:SetPoint("BOTTOM", Minimap, "TOP", 2, 0)
clockTime:SetJustifyH("CENTER")
TimeManagerClockButton:SetPoint("BOTTOM", Minimap, "TOP", 0, 0)
end
if coordshown and not clockshown then
coords:SetJustifyH("CENTER")
coords:SetPoint("CENTER")
coordframe:SetPoint("BOTTOM", Minimap, "TOP", 0, 0)
end
if clockshown and coordshown then
TimeManagerClockButton:SetPoint("BOTTOMLEFT", Minimap, "TOPLEFT", 0, 0)
clockTime:SetJustifyH("LEFT")
coords:SetJustifyH("RIGHT")
TimeManagerClockButton:SetPoint("BOTTOMLEFT", Minimap, "TOPLEFT", -10, 0)
coords:SetPoint("RIGHT")
coordframe:SetPoint("BOTTOMRIGHT", Minimap, "TOPRIGHT", 0, 0)
end
end
516,19 → 506,16
name = "Font",
desc = "Select a font to use.",
type = "select",
dialogControl = "LSM30_Font",
values = fonts,
get = function()
--[[for k,v in pairs(fonts) do
for k,v in pairs(fonts) do
if v == db.lsmfont then
return k
end
end]]
return db.lsmfont
end
end,
set = function(_,font)
--db.lsmfont = fonts[font]
db.lsmfont = font
db.lsmfont = fonts[font]
clockTime:SetFont(LSM:Fetch("font", db.lsmfont), db.clockSize, db.fontFlag)
MinimapZoneText:SetFont(LSM:Fetch("font", db.lsmfont), db.zoneSize, db.fontFlag)
coords:SetFont(LSM:Fetch("font",db.lsmfont), db.coordSize, db.fontFlag)
624,22 → 611,6
end,
order = 11,
},
clock = {
name = "Display clock",
desc = "Toggle showing the clock.",
type = "toggle",
get = function() return db.clock end,
set = function()
db.clock = not db.clock
if db.clock then
TimeManagerClockButton:Show()
else
TimeManagerClockButton:Hide()
end
CoordPosition()
end,
order = 11.5,
},
zoneText = {
name = "Display zone text",
desc = "Toggle showing the zone text.",
873,7 → 844,6
SLASH_POCKETPLOT2 = "/pp"
 
MapSetup()
CoordPosition()
 
-- --restore moved frame positions--
-- for i=1, #frames do
882,16 → 852,19
-- end
-- end
 
--is here because it wasn't working down below for some odd reason...--
TimeManagerClockButton:SetScript("OnHide", CoordPosition)
TimeManagerClockButton:SetScript("OnShow", CoordPosition)
 
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
LSM:Register("font", "Negotiate Free", "Interface\\AddOns\\PocketPlot\\media\\negotiate_free.ttf")
LSM:Register("font", "Blue Highway", "Interface\\AddOns\\PocketPlot\\media\\BLUEHIGH.ttf")
 
 
mover:SetScript("OnMouseDown", function() mover:StartMoving() end)
mover:SetScript("OnMouseUp", function() mover:StopMovingOrSizing() SetPosition(movershown) end)
 
coordframe:SetScript("OnEnter", function(self)
GameTooltip:SetOwner(self, "ANCHOR_LEFT")
GameTooltip:AddLine("Location Functions", 1,1,1)
902,22 → 875,28
coordframe:SetScript("OnLeave", function() GameTooltip:Hide() end)
coordframe:SetScript("OnMouseUp", function()
if IsShiftKeyDown() then
ChatFrame1EditBox:Insert("["..coords:GetText().."]")
ChatFrameEditBox:Insert("["..coords:GetText().."]")
elseif WorldMapFrame:IsShown() then
WorldMapFrame:Hide()
else
WorldMapFrame:Show()
end
end)
local throttle = 0
coordframe:SetScript("OnUpdate", function(self, elapsed)
throttle = throttle + elapsed
if throttle >= .3 then
local coordx,coordy = GetPlayerMapPosition("player")
coords:SetFormattedText("%.1f/%.1f", coordx*100, coordy*100)
throttle = 0
coordframe:SetScript("OnUpdate", function()
local coordx,coordy = GetPlayerMapPosition("player")
coords:SetFormattedText("%.1f/%.1f", coordx*100, coordy*100)
end)
coordframe:SetScript("OnEvent", function(self)
if db.coords then
if IsInInstance() then
self:Hide()
else
self:Show()
end
CoordPosition()
end
end)
 
PocketPlot:SetScript("OnEvent", PlayerLogin)
 
coordframe:RegisterEvent("PLAYER_ENTERING_WORLD")
PocketPlot:RegisterEvent("PLAYER_LOGIN")
PocketPlot.toc
1,10 → 1,10
## Interface: 40000
## Interface: 30300
## Title: PocketPlot
## Author: Seerah
## Notes: Minimap customization
## Version: 2.10
## Version: 2.9.5
## X-Category: Minimap
## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets
## OptionalDeps: Ace3, LibSharedMedia-3.0
## SavedVariables: PocketPlotDB
## SavedVariablesPerCharacter: PocketPlotPCDB
 
13,6 → 13,5
libs\AceGUI-3.0\AceGUI-3.0.xml
libs\AceConfig-3.0\AceConfig-3.0.xml
libs\LibSharedMedia-3.0\lib.xml
Libs\AceGUI-3.0-SharedMediaWidgets\widget.xml
 
pocketplot.lua
\ No newline at end of file
media/Typodermic Freeware License.txt File deleted
media/PPblips3.blp Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
media/negotiate_free.ttf Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
media/BLUEHIGH.TTF Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes : Added: svn:mime-type + application/octet-stream
media/PPblips.blp Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes : Added: svn:mime-type + application/octet-stream
media/PPblips2.blp Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes : Added: svn:mime-type + application/octet-stream
media Property changes : Modified: svn:ignore - PPblips.png PPblips2.png PPblips3.png PPblips3.psd + PPblips.png PPblips2.png