WoWInterface SVN PocketPlot

Compare Revisions

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

Rev 60 → Rev 61

trunk/PocketPlot/pocketplot.lua
4,12 → 4,14
--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\\PPblips2.blp"
local blips = "Interface\\AddOns\\PocketPlot\\media\\PPblips3.blp"
-------------------------------------------------------------------------------------------------------------------------------------
 
local PocketPlot = CreateFrame("Frame", nil, Minimap)
local LSM = LibStub("LibSharedMedia-3.0")
local fonts = LSM:List("font")
local widgetLists = AceGUIWidgetLSMlists
local fonts = widgetLists.font
--local fonts = LSM:List("font")
local class = select(2, UnitClass("player"))
local classColor, movershown, clockFrame, clockTime, db, options
local Minimap = Minimap
20,6 → 22,7
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)
33,7 → 36,7
moverText:SetPoint("CENTER")
local coordframe = CreateFrame("Frame", nil, Minimap)
coordframe:SetHeight(28) --height of clock button
coordframe:SetWidth(60) --width of clock button
coordframe:SetWidth(100)
coordframe:EnableMouse(true)
local coords = coordframe:CreateFontString(nil, "OVERLAY")
coords:SetParent(coordframe)
63,6 → 66,7
alpha = 1,
top = false,
coords = true,
clock = true,
coordSize = 16,
classbg = false,
classfont = false,
207,6 → 211,10
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
274,9 → 282,8
--thanks, Elviswind, for shadow code to match clock
coords:SetShadowOffset(1,-1)
coords:SetShadowColor(0,0,0,1)
if db.coords then
coordframe:Show()
else
coords:SetAllPoints(coordframe)
if not db.coords then
coordframe:Hide()
end
 
285,35 → 292,38
end
 
local function CoordPosition()
local clockshown = TimeManagerClockButton:IsShown()
local coordshown = coordframe:IsShown()
local clockshown = db.clock
local coordshown = db.coords
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:SetPoint("CENTER")
coords:SetJustifyH("CENTER")
coordframe:SetPoint("TOP", Minimap, "BOTTOM", 0, 0)
end
if clockshown and coordshown then
TimeManagerClockButton:SetPoint("TOPLEFT", Minimap, "BOTTOMLEFT", -10, 0)
coords:SetPoint("RIGHT")
TimeManagerClockButton:SetPoint("TOPLEFT", Minimap, "BOTTOMLEFT", 2, 0)
clockTime:SetJustifyH("LEFT")
coords:SetJustifyH("RIGHT")
coordframe:SetPoint("TOPRIGHT", Minimap, "BOTTOMRIGHT", 0, 0)
end
else
if clockshown and not coordshown then
TimeManagerClockButton:SetPoint("BOTTOM", Minimap, "TOP", 0, 0)
TimeManagerClockButton:SetPoint("BOTTOM", Minimap, "TOP", 2, 0)
clockTime:SetJustifyH("CENTER")
end
if coordshown and not clockshown then
coords:SetPoint("CENTER")
coords:SetJustifyH("CENTER")
coordframe:SetPoint("BOTTOM", Minimap, "TOP", 0, 0)
end
if clockshown and coordshown then
TimeManagerClockButton:SetPoint("BOTTOMLEFT", Minimap, "TOPLEFT", -10, 0)
coords:SetPoint("RIGHT")
TimeManagerClockButton:SetPoint("BOTTOMLEFT", Minimap, "TOPLEFT", 0, 0)
clockTime:SetJustifyH("LEFT")
coords:SetJustifyH("RIGHT")
coordframe:SetPoint("BOTTOMRIGHT", Minimap, "TOPRIGHT", 0, 0)
end
end
506,16 → 516,19
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
end]]
return db.lsmfont
end,
set = function(_,font)
db.lsmfont = fonts[font]
--db.lsmfont = fonts[font]
db.lsmfont = 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)
611,6 → 624,22
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.",
844,6 → 873,7
SLASH_POCKETPLOT2 = "/pp"
 
MapSetup()
CoordPosition()
 
-- --restore moved frame positions--
-- for i=1, #frames do
852,19 → 882,16
-- 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", "Blue Highway", "Interface\\AddOns\\PocketPlot\\media\\BLUEHIGH.ttf")
LSM:Register("font", "Negotiate Free", "Interface\\AddOns\\PocketPlot\\media\\negotiate_free.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)
875,28 → 902,22
coordframe:SetScript("OnLeave", function() GameTooltip:Hide() end)
coordframe:SetScript("OnMouseUp", function()
if IsShiftKeyDown() then
ChatFrameEditBox:Insert("["..coords:GetText().."]")
ChatFrame1EditBox:Insert("["..coords:GetText().."]")
elseif WorldMapFrame:IsShown() then
WorldMapFrame:Hide()
else
WorldMapFrame:Show()
end
end)
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()
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
end
end)
 
PocketPlot:SetScript("OnEvent", PlayerLogin)
 
coordframe:RegisterEvent("PLAYER_ENTERING_WORLD")
PocketPlot:RegisterEvent("PLAYER_LOGIN")
trunk/PocketPlot/PocketPlot.toc
1,10 → 1,10
## Interface: 30300
## Interface: 40000
## Title: PocketPlot
## Author: Seerah
## Notes: Minimap customization
## Version: 2.9.5
## Version: 2.10
## X-Category: Minimap
## OptionalDeps: Ace3, LibSharedMedia-3.0
## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets
## SavedVariables: PocketPlotDB
## SavedVariablesPerCharacter: PocketPlotPCDB
 
13,5 → 13,6
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
trunk/PocketPlot/libs/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua New file
0,0 → 1,94
-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
-- Widget created by Yssaril
 
local AceGUI = LibStub("AceGUI-3.0")
local Media = LibStub("LibSharedMedia-3.0")
 
do
local min, max, floor = math.min, math.max, math.floor
local fixlevels = AceGUISharedMediaWidgets.fixlevels
local OnItemValueChanged = AceGUISharedMediaWidgets.OnItemValueChanged
 
do
local widgetType = "LSM30_Font_Item_Select"
local widgetVersion = 1
 
local function SetText(self, text)
if text and text ~= '' then
local _, size, outline= self.text:GetFont()
self.text:SetFont(Media:Fetch('font',text),size,outline)
end
self.text:SetText(text or "")
end
 
local function Constructor()
local self = AceGUI:Create("Dropdown-Item-Toggle")
self.type = widgetType
self.SetText = SetText
return self
end
 
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
 
do
local widgetType = "LSM30_Font"
local widgetVersion = 3
 
local function SetText(self, text)
if text and text ~= '' then
local _, size, outline= self.text:GetFont()
self.text:SetFont(Media:Fetch('font',text),size,outline)
end
self.text:SetText(text or "")
end
 
local function AddListItem(self, value, text)
local item = AceGUI:Create("LSM30_Font_Item_Select")
item:SetText(text)
item.userdata.obj = self
item.userdata.value = value
item:SetCallback("OnValueChanged", OnItemValueChanged)
self.pullout:AddItem(item)
end
 
local function SetList(self, list)
self.list = list or Media:HashTable("font")
self.pullout:Clear()
if self.multiselect then
AddCloseButton()
end
end
 
local sortlist = {}
local function ParseListItems(self)
for v in pairs(self.list) do
sortlist[#sortlist + 1] = v
end
table.sort(sortlist)
for i, value in pairs(sortlist) do
AddListItem(self, value, value)
sortlist[i] = nil
end
end
 
local function Constructor()
local self = AceGUI:Create("Dropdown")
self.type = widgetType
self.SetText = SetText
self.SetValue = AceGUISharedMediaWidgets.SetValue
self.SetList = SetList
 
local clickscript = self.button:GetScript("OnClick")
self.button:SetScript("OnClick", function(...)
self.pullout:Clear()
ParseListItems(self)
clickscript(...)
end)
 
return self
end
 
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
end
trunk/PocketPlot/libs/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua New file
0,0 → 1,274
-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
-- Widget created by Yssaril
 
local AceGUI = LibStub("AceGUI-3.0")
local Media = LibStub("LibSharedMedia-3.0")
 
do
local min, max, floor = math.min, math.max, math.floor
local fixlevels = AceGUISharedMediaWidgets.fixlevels
local OnItemValueChanged = AceGUISharedMediaWidgets.OnItemValueChanged
 
do
local widgetType = "LSM30_Sound_Item_Select"
local widgetVersion = 1
 
local function Frame_OnEnter(this)
local self = this.obj
 
if self.useHighlight then
self.highlight:Show()
end
self:Fire("OnEnter")
 
if self.specialOnEnter then
self.specialOnEnter(self)
end
end
 
local function Frame_OnLeave(this)
local self = this.obj
 
self.highlight:Hide()
self:Fire("OnLeave")
 
if self.specialOnLeave then
self.specialOnLeave(self)
end
end
 
local function OnAcquire(self)
self.frame:SetToplevel(true)
self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
end
 
local function OnRelease(self)
self.pullout = nil
self.frame:SetParent(nil)
self.frame:ClearAllPoints()
self.frame:Hide()
end
 
local function SetPullout(self, pullout)
self.pullout = pullout
 
self.frame:SetParent(nil)
self.frame:SetParent(pullout.itemFrame)
self.parent = pullout.itemFrame
fixlevels(pullout.itemFrame, pullout.itemFrame:GetChildren())
end
 
local function SetText(self, text)
self.sound = text or ''
self.text:SetText(text or "")
end
 
local function GetText(self)
return self.text:GetText()
end
 
local function SetPoint(self, ...)
self.frame:SetPoint(...)
end
 
local function Show(self)
self.frame:Show()
end
 
local function Hide(self)
self.frame:Hide()
end
 
local function SetDisabled(self, disabled)
self.disabled = disabled
if disabled then
self.useHighlight = false
self.text:SetTextColor(.5, .5, .5)
else
self.useHighlight = true
self.text:SetTextColor(1, 1, 1)
end
end
 
local function SetOnLeave(self, func)
self.specialOnLeave = func
end
 
local function SetOnEnter(self, func)
self.specialOnEnter = func
end
 
local function UpdateToggle(self)
if self.value then
self.check:Show()
else
self.check:Hide()
end
end
 
local function Frame_OnClick(this, button)
local self = this.obj
self.value = not self.value
UpdateToggle(self)
self:Fire("OnValueChanged", self.value)
end
 
local function Speaker_OnClick(this, button)
local self = this.obj
PlaySoundFile(Media:Fetch('sound',self.sound))
end
 
local function SetValue(self, value)
self.value = value
UpdateToggle(self)
end
 
local function Constructor()
local count = AceGUI:GetNextWidgetNum(type)
local frame = CreateFrame("Frame", "LSM30_Sound_DropDownItem"..count)
local self = {}
self.frame = frame
frame.obj = self
self.type = type
 
self.useHighlight = true
 
frame:SetHeight(17)
frame:SetFrameStrata("FULLSCREEN_DIALOG")
 
local button = CreateFrame("Button", nil, frame)
button:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-22,0)
button:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
self.button = button
button.obj = self
 
local speakerbutton = CreateFrame("Button", nil, frame)
speakerbutton:SetWidth(16)
speakerbutton:SetHeight(16)
speakerbutton:SetPoint("RIGHT",frame,"RIGHT",-6,0)
self.speakerbutton = speakerbutton
speakerbutton.obj = self
 
local speaker = frame:CreateTexture(nil, "BACKGROUND")
speaker:SetTexture("Interface\\Common\\VoiceChat-Speaker")
speaker:SetAllPoints(speakerbutton)
self.speaker = speaker
 
local speakeron = speakerbutton:CreateTexture(nil, "HIGHLIGHT")
speakeron:SetTexture("Interface\\Common\\VoiceChat-On")
speakeron:SetAllPoints(speakerbutton)
self.speakeron = speakeron
 
local text = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall")
text:SetTextColor(1,1,1)
text:SetJustifyH("LEFT")
text:SetPoint("TOPLEFT",frame,"TOPLEFT",18,0)
text:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-24,0)
self.text = text
 
local highlight = button:CreateTexture(nil, "OVERLAY")
highlight:SetTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight")
highlight:SetBlendMode("ADD")
highlight:SetHeight(14)
highlight:ClearAllPoints()
highlight:SetPoint("RIGHT",frame,"RIGHT",-19,0)
highlight:SetPoint("LEFT",frame,"LEFT",5,0)
highlight:Hide()
self.highlight = highlight
 
local check = frame:CreateTexture("OVERLAY")
check:SetWidth(16)
check:SetHeight(16)
check:SetPoint("LEFT",frame,"LEFT",3,-1)
check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
check:Hide()
self.check = check
 
local sub = frame:CreateTexture("OVERLAY")
sub:SetWidth(16)
sub:SetHeight(16)
sub:SetPoint("RIGHT",frame,"RIGHT",-3,-1)
sub:SetTexture("Interface\\ChatFrame\\ChatFrameExpandArrow")
sub:Hide()
self.sub = sub
 
button:SetScript("OnEnter", Frame_OnEnter)
button:SetScript("OnLeave", Frame_OnLeave)
 
self.OnAcquire = OnAcquire
self.OnRelease = OnRelease
 
self.SetPullout = SetPullout
self.GetText = GetText
self.SetText = SetText
self.SetDisabled = SetDisabled
 
self.SetPoint = SetPoint
self.Show = Show
self.Hide = Hide
 
self.SetOnLeave = SetOnLeave
self.SetOnEnter = SetOnEnter
 
self.button:SetScript("OnClick", Frame_OnClick)
self.speakerbutton:SetScript("OnClick", Speaker_OnClick)
 
self.SetValue = SetValue
 
AceGUI:RegisterAsWidget(self)
return self
end
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
 
do
local widgetType = "LSM30_Sound"
local widgetVersion = 3
 
local function AddListItem(self, value, text)
local item = AceGUI:Create("LSM30_Sound_Item_Select")
item:SetText(text)
item.userdata.obj = self
item.userdata.value = value
item:SetCallback("OnValueChanged", OnItemValueChanged)
self.pullout:AddItem(item)
end
 
local function SetList(self, list)
self.list = list or Media:HashTable("sound")
self.pullout:Clear()
if self.multiselect then
AddCloseButton()
end
end
 
local sortlist = {}
local function ParseListItems(self)
for v in pairs(self.list) do
sortlist[#sortlist + 1] = v
end
table.sort(sortlist)
for i, value in pairs(sortlist) do
AddListItem(self, value, value)
sortlist[i] = nil
end
end
 
local function Constructor()
local self = AceGUI:Create("Dropdown")
self.type = widgetType
self.SetList = SetList
self.SetValue = AceGUISharedMediaWidgets.SetValue
 
local clickscript = self.button:GetScript("OnClick")
self.button:SetScript("OnClick", function(...)
self.pullout:Clear()
ParseListItems(self)
clickscript(...)
end)
 
return self
end
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
end
trunk/PocketPlot/libs/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua New file
0,0 → 1,106
-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
-- Widget created by Yssaril
 
local AceGUI = LibStub("AceGUI-3.0")
local Media = LibStub("LibSharedMedia-3.0")
 
do
local min, max, floor = math.min, math.max, math.floor
local fixlevels = AceGUISharedMediaWidgets.fixlevels
local OnItemValueChanged = AceGUISharedMediaWidgets.OnItemValueChanged
 
do
local widgetType = "LSM30_Statusbar_Item_Select"
local widgetVersion = 1
 
local function SetText(self, text)
if text and text ~= '' then
self.texture:SetTexture(Media:Fetch('statusbar',text))
self.texture:SetVertexColor(.5,.5,.5)
end
self.text:SetText(text or "")
end
 
local function Constructor()
local self = AceGUI:Create("Dropdown-Item-Toggle")
self.type = widgetType
self.SetText = SetText
local texture = self.frame:CreateTexture(nil, "BACKGROUND")
texture:SetTexture(0,0,0,0)
texture:SetPoint("BOTTOMRIGHT",self.frame,"BOTTOMRIGHT",-4,1)
texture:SetPoint("TOPLEFT",self.frame,"TOPLEFT",6,-1)
self.texture = texture
return self
end
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
 
do
local widgetType = "LSM30_Statusbar"
local widgetVersion = 3
 
local function SetText(self, text)
if text and text ~= '' then
self.texture:SetTexture(Media:Fetch('statusbar',text))
self.texture:SetVertexColor(.5,.5,.5)
end
self.text:SetText(text or "")
end
 
local function AddListItem(self, value, text)
local item = AceGUI:Create("LSM30_Statusbar_Item_Select")
item:SetText(text)
item.userdata.obj = self
item.userdata.value = value
item:SetCallback("OnValueChanged", OnItemValueChanged)
self.pullout:AddItem(item)
end
 
local function SetList(self, list)
self.list = list or Media:HashTable("statusbar")
self.pullout:Clear()
if self.multiselect then
AddCloseButton()
end
end
 
local sortlist = {}
local function ParseListItems(self)
for v in pairs(self.list) do
sortlist[#sortlist + 1] = v
end
table.sort(sortlist)
for i, value in pairs(sortlist) do
AddListItem(self, value, value)
sortlist[i] = nil
end
end
 
local function Constructor()
local self = AceGUI:Create("Dropdown")
self.type = widgetType
self.SetText = SetText
self.SetList = SetList
self.SetValue = AceGUISharedMediaWidgets.SetValue
 
local left = _G[self.dropdown:GetName() .. "Left"]
local middle = _G[self.dropdown:GetName() .. "Middle"]
local right = _G[self.dropdown:GetName() .. "Right"]
 
local texture = self.dropdown:CreateTexture(nil, "ARTWORK")
texture:SetPoint("BOTTOMRIGHT", right, "BOTTOMRIGHT" ,-39, 26)
texture:SetPoint("TOPLEFT", left, "TOPLEFT", 24, -24)
self.texture = texture
 
local clickscript = self.button:GetScript("OnClick")
self.button:SetScript("OnClick", function(...)
self.pullout:Clear()
ParseListItems(self)
clickscript(...)
end)
 
return self
end
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
end
trunk/PocketPlot/libs/AceGUI-3.0-SharedMediaWidgets/SharedFunctions.lua New file
0,0 → 1,55
-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
-- Widget created by Yssaril
LoadAddOn("LibSharedMedia-3.0")
local AceGUI = LibStub("AceGUI-3.0")
local Media = LibStub("LibSharedMedia-3.0")
 
AceGUISharedMediaWidgets = {}
do
AceGUIWidgetLSMlists = {
['font'] = Media:HashTable("font"),
['sound'] = Media:HashTable("sound"),
['statusbar'] = Media:HashTable("statusbar"),
['border'] = Media:HashTable("border"),
['background'] = Media:HashTable("background"),
}
 
local min, max, floor = math.min, math.max, math.floor
 
local function fixlevels(parent,...)
local i = 1
local child = select(i, ...)
while child do
child:SetFrameLevel(parent:GetFrameLevel()+1)
fixlevels(child, child:GetChildren())
i = i + 1
child = select(i, ...)
end
end
 
local function OnItemValueChanged(this, event, checked)
local self = this.userdata.obj
if self.multiselect then
self:Fire("OnValueChanged", this.userdata.value, checked)
else
if checked then
self:SetValue(this.userdata.value)
self:Fire("OnValueChanged", this.userdata.value)
else
this:SetValue(true)
end
self.pullout:Close()
end
end
 
local function SetValue(self, value)
if value then
self:SetText(value or "")
end
self.value = value
end
 
AceGUISharedMediaWidgets.fixlevels = fixlevels
AceGUISharedMediaWidgets.OnItemValueChanged = OnItemValueChanged
AceGUISharedMediaWidgets.SetValue = SetValue
end
trunk/PocketPlot/libs/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua New file
0,0 → 1,163
-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
-- Widget created by Yssaril
 
local AceGUI = LibStub("AceGUI-3.0")
local Media = LibStub("LibSharedMedia-3.0")
 
do
local min, max, floor = math.min, math.max, math.floor
local fixlevels = AceGUISharedMediaWidgets.fixlevels
local OnItemValueChanged = AceGUISharedMediaWidgets.OnItemValueChanged
 
do
local widgetType = "LSM30_Border_Item_Select"
local widgetVersion = 1
 
local function Frame_OnEnter(this)
local self = this.obj
 
if self.useHighlight then
self.highlight:Show()
self.border:Show()
end
self:Fire("OnEnter")
 
if self.specialOnEnter then
self.specialOnEnter(self)
end
end
 
local function Frame_OnLeave(this)
local self = this.obj
self.border:Hide()
self.highlight:Hide()
self:Fire("OnLeave")
 
if self.specialOnLeave then
self.specialOnLeave(self)
end
end
 
local function SetText(self, text)
if text and text ~= '' then
local backdropTable = self.border:GetBackdrop()
backdropTable.edgeFile = Media:Fetch('border',text)
self.border:SetBackdrop(backdropTable)
end
self.text:SetText(text or "")
end
 
local function Constructor()
local self = AceGUI:Create("Dropdown-Item-Toggle")
self.type = widgetType
self.SetText = SetText
local border = CreateFrame('Frame')
border:SetFrameStrata("TOOLTIP")
border:SetWidth(64)
border:SetHeight(32)
border:SetPoint("LEFT",self.frame,"RIGHT",5,0)
border:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background",
tile = true, tileSize = 16, edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 }})
self.border = border
border:Hide()
self.frame:SetScript("OnEnter", Frame_OnEnter)
self.frame:SetScript("OnLeave", Frame_OnLeave)
return self
end
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
 
do
local widgetType = "LSM30_Border"
local widgetVersion = 3
 
local function Frame_OnEnter(this)
local self = this.obj
local text = self.text:GetText()
if text ~= nil and text ~= '' then
self.borderframe:Show()
end
end
 
local function Frame_OnLeave(this)
local self = this.obj
self.borderframe:Hide()
end
 
local function AddListItem(self, value, text)
local item = AceGUI:Create("LSM30_Border_Item_Select")
item:SetText(text)
item.userdata.obj = self
item.userdata.value = value
item:SetCallback("OnValueChanged", OnItemValueChanged)
self.pullout:AddItem(item)
end
 
local function SetList(self, list)
self.list = list or Media:HashTable("border")
self.pullout:Clear()
if self.multiselect then
AddCloseButton()
end
end
 
local sortlist = {}
local function ParseListItems(self)
for v in pairs(self.list) do
sortlist[#sortlist + 1] = v
end
table.sort(sortlist)
for i, value in pairs(sortlist) do
AddListItem(self, value, value)
sortlist[i] = nil
end
end
 
local function SetText(self, text)
if text and text ~= '' then
local backdropTable = self.borderframe:GetBackdrop()
backdropTable.edgeFile = Media:Fetch('border',text)
self.borderframe:SetBackdrop(backdropTable)
end
self.text:SetText(text or "")
end
 
local function Constructor()
local self = AceGUI:Create("Dropdown")
self.type = widgetType
self.SetList = SetList
self.SetText = SetText
self.SetValue = AceGUISharedMediaWidgets.SetValue
 
local left = _G[self.dropdown:GetName() .. "Left"]
local middle = _G[self.dropdown:GetName() .. "Middle"]
local right = _G[self.dropdown:GetName() .. "Right"]
 
local borderframe = CreateFrame('Frame')
borderframe:SetFrameStrata("TOOLTIP")
borderframe:SetWidth(64)
borderframe:SetHeight(32)
borderframe:SetPoint("LEFT",right,"RIGHT",-15,0)
borderframe:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background",
tile = true, tileSize = 16, edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 }})
self.borderframe = borderframe
borderframe:Hide()
 
self.dropdown:EnableMouse(true)
self.dropdown:SetScript("OnEnter", Frame_OnEnter)
self.dropdown:SetScript("OnLeave", Frame_OnLeave)
 
local clickscript = self.button:GetScript("OnClick")
self.button:SetScript("OnClick", function(...)
self.pullout:Clear()
ParseListItems(self)
clickscript(...)
end)
 
return self
end
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
end
trunk/PocketPlot/libs/AceGUI-3.0-SharedMediaWidgets/widget.xml New file
0,0 → 1,9
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="SharedFunctions.lua" />
<Script file="FontWidget.lua" />
<Script file="SoundWidget.lua" />
<Script file="StatusbarWidget.lua" />
<Script file="BorderWidget.lua" />
<Script file="BackgroundWidget.lua" />
</Ui>
\ No newline at end of file
trunk/PocketPlot/libs/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua New file
0,0 → 1,162
-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
-- Widget created by Yssaril
 
local AceGUI = LibStub("AceGUI-3.0")
local Media = LibStub("LibSharedMedia-3.0")
 
do
local min, max, floor = math.min, math.max, math.floor
local fixlevels = AceGUISharedMediaWidgets.fixlevels
local OnItemValueChanged = AceGUISharedMediaWidgets.OnItemValueChanged
 
do
local widgetType = "LSM30_Background_Item_Select"
local widgetVersion = 1
 
local function Frame_OnEnter(this)
local self = this.obj
 
if self.useHighlight then
self.highlight:Show()
self.texture:Show()
end
self:Fire("OnEnter")
 
if self.specialOnEnter then
self.specialOnEnter(self)
end
end
 
local function Frame_OnLeave(this)
local self = this.obj
self.texture:Hide()
self.highlight:Hide()
self:Fire("OnLeave")
 
if self.specialOnLeave then
self.specialOnLeave(self)
end
end
 
local function SetText(self, text)
if text and text ~= '' then
self.texture:SetTexture(Media:Fetch('background',text))
end
self.text:SetText(text or "")
end
 
local function Constructor()
local self = AceGUI:Create("Dropdown-Item-Toggle")
self.type = widgetType
self.SetText = SetText
local textureframe = CreateFrame('Frame')
textureframe:SetFrameStrata("TOOLTIP")
textureframe:SetWidth(128)
textureframe:SetHeight(128)
textureframe:SetPoint("LEFT",self.frame,"RIGHT",5,0)
self.textureframe = textureframe
local texture = textureframe:CreateTexture(nil, "OVERLAY")
texture:SetTexture(0,0,0,0)
texture:SetAllPoints(textureframe)
texture:Hide()
self.texture = texture
self.frame:SetScript("OnEnter", Frame_OnEnter)
self.frame:SetScript("OnLeave", Frame_OnLeave)
return self
end
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
 
do
local widgetType = "LSM30_Background"
local widgetVersion = 3
 
local function Frame_OnEnter(this)
local self = this.obj
local text = self.text:GetText()
if text ~= nil and text ~= '' then
self.textureframe:Show()
end
end
 
local function Frame_OnLeave(this)
local self = this.obj
self.textureframe:Hide()
end
 
local function SetText(self, text)
if text and text ~= '' then
self.texture:SetTexture(Media:Fetch('background',text))
end
self.text:SetText(text or "")
end
 
local function AddListItem(self, value, text)
local item = AceGUI:Create("LSM30_Background_Item_Select")
item:SetText(text)
item.userdata.obj = self
item.userdata.value = value
item:SetCallback("OnValueChanged", OnItemValueChanged)
self.pullout:AddItem(item)
end
 
local function SetList(self, list)
self.list = list or Media:HashTable("background")
self.pullout:Clear()
 
if self.multiselect then
AddCloseButton()
end
end
 
local sortlist = {}
local function ParseListItems(self)
for v in pairs(self.list) do
sortlist[#sortlist + 1] = v
end
table.sort(sortlist)
for i, value in pairs(sortlist) do
AddListItem(self, value, value)
sortlist[i] = nil
end
end
 
local function Constructor()
local self = AceGUI:Create("Dropdown")
self.type = widgetType
self.SetText = SetText
self.SetList = SetList
self.SetValue = AceGUISharedMediaWidgets.SetValue
 
local left = _G[self.dropdown:GetName() .. "Left"]
local middle = _G[self.dropdown:GetName() .. "Middle"]
local right = _G[self.dropdown:GetName() .. "Right"]
 
local textureframe = CreateFrame('Frame')
textureframe:SetFrameStrata("TOOLTIP")
textureframe:SetWidth(128)
textureframe:SetHeight(128)
textureframe:SetPoint("LEFT",right,"RIGHT",-15,0)
self.textureframe = textureframe
local texture = textureframe:CreateTexture(nil, "OVERLAY")
texture:SetTexture(0,0,0,0)
texture:SetAllPoints(textureframe)
textureframe:Hide()
self.texture = texture
 
self.dropdown:EnableMouse(true)
self.dropdown:SetScript("OnEnter", Frame_OnEnter)
self.dropdown:SetScript("OnLeave", Frame_OnLeave)
 
local clickscript = self.button:GetScript("OnClick")
self.button:SetScript("OnClick", function(...)
self.pullout:Clear()
ParseListItems(self)
clickscript(...)
end)
 
return self
end
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
end
trunk/PocketPlot/media/BLUEHIGH.TTF Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
trunk/PocketPlot/media/PPblips.blp Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
trunk/PocketPlot/media/PPblips2.blp Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
trunk/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
trunk/PocketPlot/media/negotiate_free.ttf Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes : Added: svn:mime-type + application/octet-stream
trunk/PocketPlot/media/Typodermic Freeware License.txt New file
0,0 → 1,32
TYPODERMIC FONTS FREEWARE FONTS EULA (End User License Agreement) and SOFTWARE INCLUSION AGREEMENT
 
TYPODERMIC FONTS FREEWARE FONTS EULA
 
The Typodermic Freeware Fonts in TrueType and PostScript format contained in this file are free for personal and commercial purposes. No payment is necessary to use Typodermic Freeware Fonts for personal or commercial use. If you wish to include Typodermic Freeware Fonts in software see the SOFTWARE INCLUSION AGREEMENT below.
 
USAGE
You can use Typodermic Freeware Fonts on a website but do not combine fonts into a single archive or alter them in any way. We appreciate inclusion of the font name and trademark or site URL in credits or documentation but it is not mandatory.
 
Some Typodermic Freeware Fonts may have enhanced and/or expanded families available for sale at www.typodermic.com.
 
PAYMENT
Payment is not required for the use of Typodermic Freeware Fonts unless they are intended to be included with software. More details follow.
 
SUPPORT
Font installation help is available at http://www.myfonts.com/support. If you experience problems with any Typodermic font, please visit www.myfonts.com to verify you have the latest version. If you download Typodermic Freeware Fonts from other websites you may get older versions that have spacing issues, incomplete character sets or technical problems.
 
SOFTWARE INCLUSION AGREEMENT
 
The SOFTWARE PRODUCT is protected by copyright laws and International copyright treaties, as well as other intellectual property laws and treaties. The SOFTWARE PRODUCT is licensed, not sold.
 
1. GRANT OF LICENSE. This document grants you the following rights:
- Installation and Use. You may install and use an unlimited number of copies of the SOFTWARE PRODUCT. You may copy and distribute unlimited copies of the SOFTWARE PRODUCT as you receive them, in any medium, provided that you publish on each copy an appropriate copyright notice. Keep intact all the notices that refer to this License and give any other recipients of the fonts a copy of this License along with the fonts.
 
2. LIMITED WARRANTY NO WARRANTIES. Typodermic Fonts expressly disclaims any warranty for the SOFTWARE PRODUCT. The SOFTWARE PRODUCT and any related documentation is provided "as is" without warranty of any kind, either express or implied, including, without limitation, the implied warranties or merchantability, fitness for a particular purpose, or non-infringement. The entire risk arising out of use or performance of the SOFTWARE PRODUCT remains with you.
NO LIABILITY FOR CONSEQUENTIAL DAMAGES. In no event shall Ray Larabie or Typodermic Fonts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising out of the use of or inability to use this product, even if Typodermic Fonts has been advised of the possibility of such damages.
 
3. MISCELLANEOUS
Should you have any questions concerning this document or you desire to contact Typodermic Fonts for any reason, please email http://www.typodermic.com/about.html.
 
4. GOVERNING LAW
This agreement is governed by the laws of Canada and the province of British Columbia.
trunk/PocketPlot/media Property changes : Modified: svn:ignore - PPblips.png PPblips2.png + PPblips.png PPblips2.png PPblips3.png PPblips3.psd