diff --git a/pMinimap_Config/pMinimap_Config.lua b/pMinimap_Config/pMinimap_Config.lua
index b6c5b41..ec44dc7 100644
--- a/pMinimap_Config/pMinimap_Config.lua
+++ b/pMinimap_Config/pMinimap_Config.lua
@@ -1 +1 @@
-LibStub('LibSimpleOptions-1.0').AddOptionsPanel('pMinimap', function(self)
local title, sub = self:MakeTitleTextAndSubText('pMinimap', 'These options allow you to customize the looks of pMinimap.')
self:MakeToggle(
'name', 'Toggle Minimap Locking', 'description', '',
'default', false, 'current', pMinimapDB2.unlocked,
'setFunc', function(x)
pMinimapDB2.unlocked = x
if(x) then
Minimap:SetBackdropColor(0, 1, 0, 0.5)
else
Minimap:SetBackdropColor(unpack(pMinimapDB2.colors))
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -16)
self:MakeToggle(
'name', 'Toggle Clock Block', 'description', '',
'default', true, 'current', pMinimapDB2.clock,
'setFunc', function(x)
pMinimapDB2.clock = x
if(x) then
if(not IsAddOnLoaded('pMinimap_Clock')) then LoadAddOn('pMinimap_Clock') end
TimeManagerClockButton:Show()
TimeManagerClockButton:ClearAllPoints()
if(pMinimapDB2.coords) then
MiniMapCoordButton:ClearAllPoints()
MiniMapCoordButton:SetPoint('BOTTOMRIGHT', Minimap)
TimeManagerClockButton:SetPoint('BOTTOMLEFT', Minimap)
else
TimeManagerClockButton:SetPoint('BOTTOM', Minimap)
end
else
TimeManagerClockButton:Hide()
if(pMinimapDB2.coords) then
MiniMapCoordButton:ClearAllPoints()
MiniMapCoordButton:SetPoint('BOTTOM', Minimap)
end
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -38)
self:MakeToggle(
'name', 'Toggle Coords Block', 'description', '',
'default', false, 'current', pMinimapDB2.coords,
'setFunc', function(x)
pMinimapDB2.coords = x
if(x) then
if(not IsAddOnLoaded('pMinimap_Coords')) then LoadAddOn('pMinimap_Coords') end
MiniMapCoordButton:Show()
MiniMapCoordButton:ClearAllPoints()
if(pMinimapDB2.clock) then
TimeManagerClockButton:ClearAllPoints()
TimeManagerClockButton:SetPoint('BOTTOMLEFT', Minimap)
MiniMapCoordButton:SetPoint('BOTTOMRIGHT', Minimap)
else
MiniMapCoordButton:SetPoint('BOTTOM', Minimap)
end
else
MiniMapCoordButton:Hide()
if(pMinimapDB2.clock) then
TimeManagerClockButton:ClearAllPoints()
TimeManagerClockButton:SetPoint('BOTTOM', Minimap)
end
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -60)
self:MakeToggle(
'name', 'Toggle Subzone Tooltip', 'description', '',
'default', false, 'current', pMinimapDB2.subzone,
'setFunc', function(x)
pMinimapDB2.subzone = x
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -82)
self:MakeToggle(
'name', 'Toggle Mail Text', 'description', '',
'default', true, 'current', pMinimapDB2.mail,
'setFunc', function(x)
pMinimapDB2.mail = x
if(x) then
MiniMapMailFrame:RegisterEvent('UPDATE_PENDING_MAIL')
MiniMapMailFrame:Show()
else
MiniMapMailFrame:UnregisterEvent('UPDATE_PENDING_MAIL')
MiniMapMailFrame:Hide()
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -104)
self:MakeToggle(
'name', 'Toggle Durability Coloring', 'description', '',
'default', true, 'current', pMinimapDB2.dura,
'setFunc', function(x)
pMinimapDB2.dura = x
if(x) then
if(not IsAddOnLoaded('pMinimap_Durability')) then
LoadAddOn('pMinimap_Durability')
else
pMinimap:RegisterEvent('UPDATE_INVENTORY_ALERTS')
pMinimap.UPDATE_INVENTORY_ALERTS()
DurabilityFrame:SetAlpha(0)
end
else
pMinimap:UnregisterEvent('UPDATE_INVENTORY_ALERTS')
Minimap:SetBackdropColor(unpack(pMinimapDB2.colors))
DurabilityFrame:SetAlpha(1)
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -126)
self:MakeSlider(
'name', 'Minimap Scale',
'description', 'Drag to change the minimap scale',
'default', 0.9,
'minText', '0.75', 'maxText', '2.50',
'minValue', 0.75, 'maxValue', 2.50,
'step', 0.01,
'current', pMinimapDB2.scale,
'setFunc', function(x)
pMinimapDB2.scale = x
Minimap:SetScale(x)
end,
'currentTextFunc', function(num)
return format('%.2f', num)
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 225, -26)
self:MakeSlider(
'name', 'Backdrop offset',
'description', 'Drag to change the backdrop border size',
'default', 1,
'minText', '0', 'maxText', '10',
'minValue', 0, 'maxValue', 10,
'step', 1,
'current', pMinimapDB2.offset,
'setFunc', function(x)
pMinimapDB2.offset = x
Minimap:SetBackdrop({bgFile = [=[Interface\ChatFrame\ChatFrameBackground]=], insets = {top = - x, left = - x, bottom = - x, right = - x}})
Minimap:SetBackdropColor(unpack(pMinimapDB2.colors))
end,
'currentTextFunc', function(num) return num end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 225, -66)
self:MakeSlider(
'name', 'Font size',
'description', 'Set the font size by dragging the slider',
'default', 13,
'minText', '5', 'maxText', '18',
'minValue', 5, 'maxValue', 18,
'step', 1,
'current', pMinimapDB2.fontsize,
'setFunc', function(x)
pMinimapDB2.fontsize = x
MiniMapMailText:SetFont(pMinimapDB2.font, x, pMinimapDB2.fontflag)
MinimapZoneText:SetFont(pMinimapDB2.font, x, pMinimapDB2.fontflag)
if(pMinimapDB2.clock) then
TimeManagerClockTicker:SetFont(pMinimapDB2.font, x, pMinimapDB2.fontflag)
end
if(pMinimapDB2.coords) then
MiniMapCoordText:SetFont(pMinimapDB2.font, x, pMinimapDB2.fontflag)
end
end,
'currentTextFunc', function(num) return num end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 225, -106)
self:MakeSlider(
'name', 'Frame level',
'description', 'Set your Minimap\'s frame level in this slider',
'default', 2,
'minText', '1', 'maxText', '15',
'minValue', 1, 'maxValue', 15,
'step', 1,
'current', pMinimapDB2.level,
'setFunc', function(x)
pMinimapDB2.level = x
Minimap:SetFrameLevel(x)
end,
'currentTextFunc', function(num) return num end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 225, -146)
self:MakeColorPicker(
'name', 'Backdrop color',
'description', 'Click to set a custom backdrop color',
'hasAlpha', true,
'defaultR', 0,
'defaultG', 0,
'defaultB', 0,
'defaultA', 1,
'getFunc', function() return unpack(pMinimapDB2.colors) end,
'setFunc', function(r, g, b, a)
pMinimapDB2.colors[1] = r
pMinimapDB2.colors[2] = g
pMinimapDB2.colors[3] = b
pMinimapDB2.colors[4] = a
Minimap:SetBackdropColor(unpack(pMinimapDB2.colors))
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -340)
self:MakeDropDown(
'name', 'Font flag',
'description', 'Set the font flag from a dropdown',
'values', {'OUTLINE', 'Outline', 'THICKOUTLINE', 'Thick Outline', 'MONOCHROME', 'Monochrome', 'nil', 'None'},
'default', 'OUTLINE',
'current', pMinimapDB2.fontflag,
'setFunc', function(x)
pMinimapDB2.fontflag = x
MiniMapMailText:SetFont(pMinimapDB2.font, pMinimapDB2.fontsize, x)
MinimapZoneText:SetFont(pMinimapDB2.font, pMinimapDB2.fontsize, x)
if(pMinimapDB2.clock) then
TimeManagerClockTicker:SetFont(pMinimapDB2.font, pMinimapDB2.fontsize, x)
end
if(pMinimapDB2.coords) then
MiniMapCoordText:SetFont(pMinimapDB2.font, pMinimapDB2.fontsize, x)
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 265, -340)
self:MakeDropDown(
'name', 'Frame strata',
'description', 'Set your Minimap\'s frame strata in this dropdown',
'values', {'DIALOG', 'Dialog', 'HIGH', 'High', 'MEDIUM', 'Medium', 'LOW', 'Low', 'BACKGROUND', 'Background'},
'default', 'BACKGROUND',
'current', pMinimapDB2.strata,
'setFunc', function(x)
pMinimapDB2.strata = x
Minimap:SetFrameStrata(x)
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 140, -340)
end)
\ No newline at end of file
+LibStub('LibSimpleOptions-1.0').AddOptionsPanel('pMinimap', function(self)
local title, sub = self:MakeTitleTextAndSubText('pMinimap', 'These options allow you to customize the looks of pMinimap.')
self:MakeToggle(
'name', 'Toggle Minimap Locking', 'description', '',
'default', false, 'current', pMinimapDB.unlocked,
'setFunc', function(x)
pMinimapDB.unlocked = x
if(x) then
Minimap:SetBackdropColor(0, 1, 0, 0.5)
else
Minimap:SetBackdropColor(unpack(pMinimapDB.colors))
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -16)
self:MakeToggle(
'name', 'Toggle Clock Block', 'description', '',
'default', true, 'current', pMinimapDB.clock,
'setFunc', function(x)
pMinimapDB.clock = x
if(x) then
if(not IsAddOnLoaded('pMinimap_Clock')) then LoadAddOn('pMinimap_Clock') end
TimeManagerClockButton:Show()
TimeManagerClockButton:ClearAllPoints()
if(pMinimapDB.coords) then
MiniMapCoordButton:ClearAllPoints()
MiniMapCoordButton:SetPoint('BOTTOMRIGHT', Minimap)
TimeManagerClockButton:SetPoint('BOTTOMLEFT', Minimap)
else
TimeManagerClockButton:SetPoint('BOTTOM', Minimap)
end
else
TimeManagerClockButton:Hide()
if(pMinimapDB.coords) then
MiniMapCoordButton:ClearAllPoints()
MiniMapCoordButton:SetPoint('BOTTOM', Minimap)
end
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -38)
self:MakeToggle(
'name', 'Toggle Coords Block', 'description', '',
'default', false, 'current', pMinimapDB.coords,
'setFunc', function(x)
pMinimapDB.coords = x
if(x) then
if(not IsAddOnLoaded('pMinimap_Coords')) then LoadAddOn('pMinimap_Coords') end
MiniMapCoordButton:Show()
MiniMapCoordButton:ClearAllPoints()
if(pMinimapDB.clock) then
TimeManagerClockButton:ClearAllPoints()
TimeManagerClockButton:SetPoint('BOTTOMLEFT', Minimap)
MiniMapCoordButton:SetPoint('BOTTOMRIGHT', Minimap)
else
MiniMapCoordButton:SetPoint('BOTTOM', Minimap)
end
else
MiniMapCoordButton:Hide()
if(pMinimapDB.clock) then
TimeManagerClockButton:ClearAllPoints()
TimeManagerClockButton:SetPoint('BOTTOM', Minimap)
end
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -60)
self:MakeToggle(
'name', 'Toggle Subzone Tooltip', 'description', '',
'default', false, 'current', pMinimapDB.subzone,
'setFunc', function(x)
pMinimapDB.subzone = x
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -82)
self:MakeToggle(
'name', 'Toggle Mail Text', 'description', '',
'default', true, 'current', pMinimapDB.mail,
'setFunc', function(x)
pMinimapDB.mail = x
if(x) then
MiniMapMailFrame:RegisterEvent('UPDATE_PENDING_MAIL')
MiniMapMailFrame:Show()
else
MiniMapMailFrame:UnregisterEvent('UPDATE_PENDING_MAIL')
MiniMapMailFrame:Hide()
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -104)
self:MakeToggle(
'name', 'Toggle Durability Coloring', 'description', '',
'default', true, 'current', pMinimapDB.durabi,
'setFunc', function(x)
pMinimapDB.durabi = x
if(x) then
if(not IsAddOnLoaded('pMinimap_Durability')) then
LoadAddOn('pMinimap_Durability')
else
pMinimap:RegisterEvent('UPDATE_INVENTORY_ALERTS')
pMinimap.UPDATE_INVENTORY_ALERTS()
DurabilityFrame:SetAlpha(0)
end
else
pMinimap:UnregisterEvent('UPDATE_INVENTORY_ALERTS')
Minimap:SetBackdropColor(unpack(pMinimapDB.colors))
DurabilityFrame:SetAlpha(1)
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -126)
self:MakeSlider(
'name', 'Minimap Scale',
'description', 'Drag to change the minimap scale',
'default', 0.9,
'minText', '0.75', 'maxText', '2.50',
'minValue', 0.75, 'maxValue', 2.50,
'step', 0.01,
'current', pMinimapDB.scale,
'setFunc', function(x)
pMinimapDB.scale = x
Minimap:SetScale(x)
end,
'currentTextFunc', function(num)
return format('%.2f', num)
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 225, -26)
self:MakeSlider(
'name', 'Backdrop offset',
'description', 'Drag to change the backdrop border size',
'default', 1,
'minText', '0', 'maxText', '10',
'minValue', 0, 'maxValue', 10,
'step', 1,
'current', pMinimapDB.offset,
'setFunc', function(x)
pMinimapDB.offset = x
Minimap:SetBackdrop({bgFile = [=[Interface\ChatFrame\ChatFrameBackground]=], insets = {top = - x, left = - x, bottom = - x, right = - x}})
Minimap:SetBackdropColor(unpack(pMinimapDB.colors))
end,
'currentTextFunc', function(num) return num end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 225, -66)
self:MakeSlider(
'name', 'Font size',
'description', 'Set the font size by dragging the slider',
'default', 13,
'minText', '5', 'maxText', '18',
'minValue', 5, 'maxValue', 18,
'step', 1,
'current', pMinimapDB.fontsize,
'setFunc', function(x)
pMinimapDB.fontsize = x
MiniMapMailText:SetFont(pMinimapDB.font, x, pMinimapDB.fontflag)
MinimapZoneText:SetFont(pMinimapDB.font, x, pMinimapDB.fontflag)
if(pMinimapDB.clock) then
TimeManagerClockTicker:SetFont(pMinimapDB.font, x, pMinimapDB.fontflag)
end
if(pMinimapDB.coords) then
MiniMapCoordText:SetFont(pMinimapDB.font, x, pMinimapDB.fontflag)
end
end,
'currentTextFunc', function(num) return num end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 225, -106)
self:MakeSlider(
'name', 'Frame level',
'description', 'Set your Minimap\'s frame level in this slider',
'default', 2,
'minText', '1', 'maxText', '15',
'minValue', 1, 'maxValue', 15,
'step', 1,
'current', pMinimapDB.level,
'setFunc', function(x)
pMinimapDB.level = x
Minimap:SetFrameLevel(x)
end,
'currentTextFunc', function(num) return num end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 225, -146)
self:MakeColorPicker(
'name', 'Backdrop color',
'description', 'Click to set a custom backdrop color',
'hasAlpha', true,
'defaultR', 0,
'defaultG', 0,
'defaultB', 0,
'defaultA', 1,
'getFunc', function() return unpack(pMinimapDB.colors) end,
'setFunc', function(r, g, b, a)
pMinimapDB.colors[1] = r
pMinimapDB.colors[2] = g
pMinimapDB.colors[3] = b
pMinimapDB.colors[4] = a
Minimap:SetBackdropColor(unpack(pMinimapDB.colors))
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -340)
self:MakeDropDown(
'name', 'Font flag',
'description', 'Set the font flag from a dropdown',
'values', {'OUTLINE', 'Outline', 'THICKOUTLINE', 'Thick Outline', 'MONOCHROME', 'Monochrome', 'nil', 'None'},
'default', 'OUTLINE',
'current', pMinimapDB.fontflag,
'setFunc', function(x)
pMinimapDB.fontflag = x
MiniMapMailText:SetFont(pMinimapDB.font, pMinimapDB.fontsize, x)
MinimapZoneText:SetFont(pMinimapDB.font, pMinimapDB.fontsize, x)
if(pMinimapDB.clock) then
TimeManagerClockTicker:SetFont(pMinimapDB.font, pMinimapDB.fontsize, x)
end
if(pMinimapDB.coords) then
MiniMapCoordText:SetFont(pMinimapDB.font, pMinimapDB.fontsize, x)
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 265, -340)
self:MakeDropDown(
'name', 'Frame strata',
'description', 'Set your Minimap\'s frame strata in this dropdown',
'values', {'DIALOG', 'Dialog', 'HIGH', 'High', 'MEDIUM', 'Medium', 'LOW', 'Low', 'BACKGROUND', 'Background'},
'default', 'BACKGROUND',
'current', pMinimapDB.strata,
'setFunc', function(x)
pMinimapDB.strata = x
Minimap:SetFrameStrata(x)
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 140, -340)
end)
\ No newline at end of file