WoWInterface SVN PocketPlot

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /branches
    from Rev 28 to Rev 29
    Reverse comparison

Rev 28 → Rev 29

PocketPlot/pocketplot.lua
20,7 → 20,6
 
local defaults = {
font = "Interface\\AddOns\\PocketPlot\\media\\BLUEHIGH.ttf", --file path to a .ttf font
lsmfont = "Blue Highway",
zoneSize = 14, --font size
clockSize = 16, --font size
scale = .9, --scale of the minimap
46,7 → 45,7
MinimapZoneTextButton:SetPoint("TOP", Minimap, "TOP", 0, -1) --where the zone text is located
MinimapZoneTextButton:SetFrameLevel(5)
if LSM then
MinimapZoneText:SetFont(LSM:Fetch("font", PocketPlotDB.lsmfont), PocketPlotDB.zoneSize, "OUTLINE") --font and font size for zone text
MinimapZoneText:SetFont(PocketPlotDB.lsmfont, PocketPlotDB.zoneSize, "OUTLINE") --font and font size for zone text
else
MinimapZoneText:SetFont(PocketPlotDB.font, PocketPlotDB.zoneSize, "OUTLINE") --font and font size for zone text
end
85,7 → 84,7
clockFrame:Hide()
TimeManagerClockButton:SetPoint("TOP", Minimap, "BOTTOM", 0, 0)
if LSM then
clockTime:SetFont(LSM:Fetch("font", PocketPlotDB.lsmfont), PocketPlotDB.clockSize, "OUTLINE")
clockTime:SetFont(PocketPlotDB.lsmfont, PocketPlotDB.clockSize, "OUTLINE")
else
clockTime:SetFont(PocketPlotDB.font, PocketPlotDB.clockSize, "OUTLINE")
end
185,8 → 184,13
"step", .05,
"default", .9,
"current", PocketPlotDB.scale,
"setFunc", function(value) PocketPlotDB.scale = value Minimap:SetScale(PocketPlotDB.scale) end,
"currentTextFunc", function() return ("%.0f%%"):format(PocketPlotDB.scale*100) end
"setFunc", function(value)
PocketPlotDB.scale = value
Minimap:SetScale(PocketPlotDB.scale)
end,
"currentTextFunc", function()
return ("%.0f%%"):format(PocketPlotDB.scale*100)
end
):SetPoint("TOPLEFT", subText, "BOTTOMLEFT", 0, -30)
panel:MakeColorPicker(
"name", "Border color",
198,7 → 202,10
"currentR", PocketPlotDB.bg.r,
"currentG", PocketPlotDB.bg.g,
"currentB", PocketPlotDB.bg.b,
"setFunc", function(retr,retg,retb) PocketPlotDB.bg.r,PocketPlotDB.bg.g,PocketPlotDB.bg.b = retr,retg,retb PocketPlot:SetBackdropColor(PocketPlotDB.bg.r,PocketPlotDB.bg.g,PocketPlotDB.bg.b) end
"setFunc", function(retr,retg,retb)
PocketPlotDB.bg.r,PocketPlotDB.bg.g,PocketPlotDB.bg.b = retr,retg,retb
PocketPlot:SetBackdropColor(PocketPlotDB.bg.r,PocketPlotDB.bg.g,PocketPlotDB.bg.b)
end
):SetPoint("TOPLEFT", subText, "BOTTOM", 0, -30)
panel:MakeSlider(
"name", "Zone text size",
210,8 → 217,17
"step", 1,
"default", 14,
"current", PocketPlotDB.zoneSize,
"setFunc", function(size) PocketPlotDB.zoneSize = size MinimapZoneText:SetFont(PocketPlotDB.font, PocketPlotDB.zoneSize, "OUTLINE") end,
"currentTextFunc", function() return PocketPlotDB.zoneSize end
"setFunc", function(size)
PocketPlotDB.zoneSize = size
if LSM then
MinimapZoneText:SetFont(PocketPlotDB.lsmfont, PocketPlotDB.zoneSize, "OUTLINE")
else
MinimapZoneText:SetFont(PocketPlotDB.font, PocketPlotDB.zoneSize, "OUTLINE")
end
end,
"currentTextFunc", function()
return PocketPlotDB.zoneSize
end
):SetPoint("TOPLEFT", subText, "BOTTOMLEFT", 0, -90)
panel:MakeSlider(
"name", "Clock text size",
223,8 → 239,17
"step", 1,
"default", 16,
"current", PocketPlotDB.clockSize,
"setFunc", function(size) PocketPlotDB.clockSize = size clockTime:SetFont(PocketPlotDB.font, PocketPlotDB.clockSize, "OUTLINE") end,
"currentTextFunc", function() return PocketPlotDB.clockSize end
"setFunc", function(size)
PocketPlotDB.clockSize = size
if LSM then
clockTime:SetFont(PocketPlotDB.lsmfont, PocketPlotDB.clockSize, "OUTLINE")
else
clockTime:SetFont(PocketPlotDB.font, PocketPlotDB.clockSize, "OUTLINE")
end
end,
"currentTextFunc", function()
return PocketPlotDB.clockSize
end
):SetPoint("TOPLEFT", subText, "BOTTOM", 0, -90)
panel:MakeDropDown(
"name", "Enable mover for...",
238,23 → 263,39
},
"default", "None",
"current", movershown or "None",
"setFunc", function(frame) movershown = frame MoveFrames(frame) end
"setFunc", function(frame)
movershown = frame
MoveFrames(frame)
end
):SetPoint("TOPLEFT", subText, "BOTTOMLEFT", 0, -150)
if LSM then
panel:MakeDropDown(
PPDropdown = panel:MakeDropDown(
"name", "Font",
"description", "SharedMedia was detected. Select a font.",
"values", fonts,
"default", defaultfontkey,
"current", PocketPlotDB.lsmfont,
-- "getFunc", function() return PocketPlotDB.lsmfont end,
"setFunc", function(font) DEFAULT_CHAT_FRAME:AddMessage(font) PocketPlotDB.lsmfont = font clockTime:SetFont(LSM:Fetch("font", font), PocketPlotDB.clockSize, "OUTLINE") MinimapZoneText:SetFont(LSM:Fetch("font", font), PocketPlotDB.zoneSize, "OUTLINE") end
):SetPoint("TOPLEFT", subText, "BOTTOM", 0, -150)
-- "current", PocketPlotDB.lsmfontkey,
"getFunc", function()
return PocketPlotDB.lsmfontkey
end,
"setFunc", function(font)
PocketPlotDB.lsmfontkey = font
PocketPlotDB.lsmfont = LSM:Fetch("font", LSM:List("font")[font])
clockTime:SetFont(PocketPlotDB.lsmfont, PocketPlotDB.clockSize, "OUTLINE")
MinimapZoneText:SetFont(PocketPlotDB.lsmfont, PocketPlotDB.zoneSize, "OUTLINE")
end
)
PPDropdown:SetPoint("TOPLEFT", subText, "BOTTOM", 0, -150)
end
panel:MakeButton(
"name", "Restore Positions",
"description", "Clicking this will restore all frames to their default positions.\n\nWARNING: Your UI will be reloaded in the process!",
"func", function() for i=1, #frames do PocketPlotDB[frames[i]] = nil end ReloadUI() end
"func", function()
for i=1, #frames do
PocketPlotDB[frames[i]] = nil
end
ReloadUI()
end
):SetPoint("TOP", subText, "BOTTOM", 0, -300)
end
 
274,6 → 315,10
table.insert(fonts, v)
if v == "Blue Highway" then
defaultfontkey = k
if not PocketPlotDB.lsmfont then
PocketPlotDB.lsmfontkey = defaultfontkey
PocketPlotDB.lsmfont = v
end
end
end
end