diff --git a/pMinimap_Config/pMinimap_Config.lua b/pMinimap_Config/pMinimap_Config.lua
index c80c1ea..cde0ee0 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', 'Unlocked', 'description', '',
'default', false,
'current', pMinimapDB.unlocked,
'setFunc', function(value)
pMinimapDB.unlocked = value
if(value) 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', 'Clock', 'description', '',
'default', true,
'current', pMinimapDB.clock,
'setFunc', function(value)
pMinimapDB.clock = value
if(value) then
if(not pMinimap.RunClock) then pMinimap:CreateClock() end
TimeManagerClockButton:Show()
TimeManagerClockButton:ClearAllPoints()
TimeManagerClockButton:SetPoint(pMinimapDB.coords and 'BOTTOMLEFT' or 'BOTTOM', Minimap)
else
TimeManagerClockButton:Hide()
end
if(pMinimapDB.coords) then
pMinimap.Coord:ClearAllPoints()
pMinimap.Coord:SetPoint(value and 'BOTTOMRIGHT' or 'BOTTOM', Minimap)
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -38)
self:MakeToggle(
'name', 'Coordinates', 'description', '',
'default', false,
'current', pMinimapDB.coords,
'setFunc', function(value)
pMinimapDB.coords = value
if(value) then
if(not pMinimap.RunCoords) then pMinimap:CreateCoords() end
pMinimap.Coord:Show()
pMinimap.Coord:ClearAllPoints()
pMinimap.Coord:SetPoint(pMinimapDB.clock and 'BOTTOMRIGHT' or 'BOTTOM', Minimap)
else
pMinimap.Coord:Hide()
end
if(pMinimapDB.clock) then
TimeManagerClockButton:ClearAllPoints()
TimeManagerClockButton:SetPoint(value and 'BOTTOMLEFT' or 'BOTTOM', Minimap)
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -60)
--[[
self:MakeToggle(
'name', 'SubZone', 'description', '',
'default', false,
'current', pMinimapDB.subzone,
'setFunc', function(value)
pMinimapDB.subzone = value
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -82)
--]]
self:MakeToggle(
'name', 'Mail', 'description', '',
'default', true,
'current', pMinimapDB.mail,
'setFunc', function(value)
pMinimapDB.mail = value
if(value) then
MiniMapMailFrame:RegisterEvent('UPDATE_PENDING_MAIL')
if(HasNewMail()) then
MiniMapMailFrame:Show()
end
else
MiniMapMailFrame:UnregisterEvent('UPDATE_PENDING_MAIL')
MiniMapMailFrame:Hide()
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -104)
self:MakeToggle(
'name', 'Durability', 'description', '',
'default', true,
'current', pMinimapDB.dura,
'setFunc', function(value)
pMinimapDB.dura = value
if(value) then
DurabilityFrame:SetAlpha(0)
pMinimap:RegisterEvent('UPDATE_INVENTORY_ALERTS')
pMinimap.UPDATE_INVENTORY_ALERTS()
else
DurabilityFrame:SetAlpha(1)
pMinimap:UnregisterEvent('UPDATE_INVENTORY_ALERTS')
Minimap:SetBackdropColor(unpack(pMinimapDB.colors))
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -126)
self:MakeSlider(
'name', 'Minimap Scale', 'description', '',
'default', 1,
'current', pMinimapDB.scale,
'minText', '0.75', 'maxText', '2.50',
'minValue', 0.75, 'maxValue', 2.50,
'step', 0.01,
'setFunc', function(value)
pMinimapDB.scale = value
Minimap:SetScale(value)
end,
'currentTextFunc', function(num)
return format('%.2f', num)
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 225, -26)
self:MakeSlider(
'name', 'Backdrop Thickness', 'description', '',
'default', 1,
'current', pMinimapDB.offset,
'minText', '0', 'maxText', '10',
'minValue', 0, 'maxValue', 10,
'step', 0.5,
'setFunc', function(value)
pMinimapDB.offset = value
Minimap:SetBackdrop({bgFile = [=[Interface\ChatFrame\ChatFrameBackground]=], insets = {top = - value, left = - value, bottom = - value, right = - value}})
Minimap:SetBackdropColor(unpack(pMinimapDB.colors))
end,
'currentTextFunc', function(num)
return format('%.1f', num)
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 225, -60)
self:MakeSlider(
'name', 'Font Size', 'description', '',
'default', 13,
'current', pMinimapDB.fontsize,
'minText', '5', 'maxText', '18',
'minValue', 5, 'maxValue', 18,
'step', 1,
'setFunc', function(value)
pMinimapDB.fontsize = value
pMinimap.Mail:SetTextHeight(value)
MinimapZoneText:SetTextHeight(value)
if(pMinimapDB.clock) then
TimeManagerClockTicker:SetTextHeight(value)
end
if(pMinimapDB.coords) then
pMinimap.Coord.Text:SetTextHeight(value)
end
end,
'currentTextFunc', function(num)
return num
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 225, -106)
self:MakeSlider(
'name', 'Minimap FrameLevel', 'description', '',
'default', 2,
'current', pMinimapDB.level,
'minText', '1', 'maxText', '15',
'minValue', 1, 'maxValue', 15,
'step', 1,
'setFunc', function(value)
pMinimapDB.level = value
Minimap:SetFrameLevel(value)
end,
'currentTextFunc', function(num)
return num
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 225, -146)
self:MakeColorPicker(
'name', 'Backdrop Color', 'description', '',
'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 = {r, g, b, a}
Minimap:SetBackdropColor(unpack(pMinimapDB.colors))
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -340)
self:MakeDropDown(
'name', 'Font Flag', 'description', '', -- better description
'values', {'OUTLINE', 'Outline', 'THICKOUTLINE', 'Thick Outline', 'MONOCHROME', 'Monochrome', 'nil', 'None'},
'default', 'OUTLINE',
'current', pMinimapDB.fontflag,
'setFunc', function(value)
pMinimapDB.fontflag = value
pMinimap.Mail:SetFont(pMinimapDB.font, pMinimapDB.fontsize, value)
MinimapZoneText:SetFont(pMinimapDB.font, pMinimapDB.fontsize, value)
if(pMinimapDB.clock) then
TimeManagerClockTicker:SetFont(pMinimapDB.font, pMinimapDB.fontsize, value)
end
if(pMinimapDB.coords) then
pMinimap.Coord.Text:SetFont(pMinimapDB.font, pMinimapDB.fontsize, value)
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 265, -340)
self:MakeDropDown(
'name', 'Frame Strata', 'description', '', -- better description
'values', {'DIALOG', 'Dialog', 'HIGH', 'High', 'MEDIUM', 'Medium', 'LOW', 'Low', 'BACKGROUND', 'Background'},
'default', 'BACKGROUND',
'current', pMinimapDB.strata,
'setFunc', function(value)
pMinimapDB.strata = value
Minimap:SetFrameStrata(value)
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', 'Unlocked', 'description', '',
'default', false,
'current', pMinimapDB.unlocked,
'setFunc', function(value)
pMinimapDB.unlocked = value
if(value) 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', 'Clock', 'description', '',
'default', true,
'current', pMinimapDB.clock,
'setFunc', function(value)
pMinimapDB.clock = value
if(value) then
if(not pMinimap.RunClock) then pMinimap:CreateClock() end
TimeManagerClockButton:Show()
TimeManagerClockButton:ClearAllPoints()
TimeManagerClockButton:SetPoint(pMinimapDB.coords and 'BOTTOMLEFT' or 'BOTTOM', Minimap)
else
TimeManagerClockButton:Hide()
end
if(pMinimapDB.coords) then
pMinimap.Coord:ClearAllPoints()
pMinimap.Coord:SetPoint(value and 'BOTTOMRIGHT' or 'BOTTOM', Minimap)
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -38)
self:MakeToggle(
'name', 'Coordinates', 'description', '',
'default', false,
'current', pMinimapDB.coords,
'setFunc', function(value)
pMinimapDB.coords = value
if(value) then
if(not pMinimap.RunCoords) then pMinimap:CreateCoords() end
pMinimap.Coord:Show()
pMinimap.Coord:ClearAllPoints()
pMinimap.Coord:SetPoint(pMinimapDB.clock and 'BOTTOMRIGHT' or 'BOTTOM', Minimap)
else
pMinimap.Coord:Hide()
end
if(pMinimapDB.clock) then
TimeManagerClockButton:ClearAllPoints()
TimeManagerClockButton:SetPoint(value and 'BOTTOMLEFT' or 'BOTTOM', Minimap)
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -60)
self:MakeToggle(
'name', 'ZoneText', 'description', '',
'default', false,
'current', pMinimapDB.zone,
'setFunc', function(value)
pMinimapDB.zone = value
if(value) then
MinimapZoneTextButton:Show()
else
MinimapZoneTextButton:Hide()
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -82)
self:MakeToggle(
'name', 'Mail', 'description', '',
'default', true,
'current', pMinimapDB.mail,
'setFunc', function(value)
pMinimapDB.mail = value
if(value) then
MiniMapMailFrame:RegisterEvent('UPDATE_PENDING_MAIL')
if(HasNewMail()) then
MiniMapMailFrame:Show()
end
else
MiniMapMailFrame:UnregisterEvent('UPDATE_PENDING_MAIL')
MiniMapMailFrame:Hide()
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -104)
self:MakeToggle(
'name', 'Durability', 'description', '',
'default', true,
'current', pMinimapDB.dura,
'setFunc', function(value)
pMinimapDB.dura = value
if(value) then
DurabilityFrame:SetAlpha(0)
pMinimap:RegisterEvent('UPDATE_INVENTORY_ALERTS')
pMinimap.UPDATE_INVENTORY_ALERTS()
else
DurabilityFrame:SetAlpha(1)
pMinimap:UnregisterEvent('UPDATE_INVENTORY_ALERTS')
Minimap:SetBackdropColor(unpack(pMinimapDB.colors))
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -126)
self:MakeSlider(
'name', 'Minimap Scale', 'description', '',
'default', 1,
'current', pMinimapDB.scale,
'minText', '0.75', 'maxText', '2.50',
'minValue', 0.75, 'maxValue', 2.50,
'step', 0.01,
'setFunc', function(value)
pMinimapDB.scale = value
Minimap:SetScale(value)
end,
'currentTextFunc', function(num)
return format('%.2f', num)
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 225, -26)
self:MakeSlider(
'name', 'Backdrop Thickness', 'description', '',
'default', 1,
'current', pMinimapDB.offset,
'minText', '0', 'maxText', '10',
'minValue', 0, 'maxValue', 10,
'step', 0.5,
'setFunc', function(value)
pMinimapDB.offset = value
Minimap:SetBackdrop({bgFile = [=[Interface\ChatFrame\ChatFrameBackground]=], insets = {top = - value, left = - value, bottom = - value, right = - value}})
Minimap:SetBackdropColor(unpack(pMinimapDB.colors))
end,
'currentTextFunc', function(num)
return format('%.1f', num)
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 225, -60)
self:MakeSlider(
'name', 'Font Size', 'description', '',
'default', 13,
'current', pMinimapDB.fontsize,
'minText', '5', 'maxText', '18',
'minValue', 5, 'maxValue', 18,
'step', 1,
'setFunc', function(value)
pMinimapDB.fontsize = value
pMinimap.Mail:SetTextHeight(value)
MinimapZoneText:SetTextHeight(value)
if(pMinimapDB.clock) then
TimeManagerClockTicker:SetTextHeight(value)
end
if(pMinimapDB.coords) then
pMinimap.Coord.Text:SetTextHeight(value)
end
end,
'currentTextFunc', function(num)
return num
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 225, -106)
self:MakeSlider(
'name', 'Minimap FrameLevel', 'description', '',
'default', 2,
'current', pMinimapDB.level,
'minText', '1', 'maxText', '15',
'minValue', 1, 'maxValue', 15,
'step', 1,
'setFunc', function(value)
pMinimapDB.level = value
Minimap:SetFrameLevel(value)
end,
'currentTextFunc', function(num)
return num
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 225, -146)
self:MakeSlider(
'name', 'ZoneText offset', 'description', '',
'default', 8,
'current', pMinimapDB.zoneOffset,
'minText', '-25', 'maxText', '25',
'minValue', -25, 'maxValue', 25,
'step', 0.5,
'setFunc', function(value)
pMinimapDB.zoneOffset = value
MinimapZoneTextButton:ClearAllPoints()
MinimapZoneTextButton:SetPoint(pMinimapDB.zonePoint1, Minimap, pMinimapDB.zonePoint2, 0, value)
end,
'currentTextFunc', function(num)
return num
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 225, -186)
self:MakeColorPicker(
'name', 'Backdrop Color', 'description', '',
'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 = {r, g, b, a}
Minimap:SetBackdropColor(unpack(pMinimapDB.colors))
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -340)
self:MakeDropDown(
'name', 'Frame Strata', 'description', '', -- better description
'values', {'DIALOG', 'Dialog', 'HIGH', 'High', 'MEDIUM', 'Medium', 'LOW', 'Low', 'BACKGROUND', 'Background'},
'default', 'BACKGROUND',
'current', pMinimapDB.strata,
'setFunc', function(value)
pMinimapDB.strata = value
Minimap:SetFrameStrata(value)
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 140, -340)
self:MakeDropDown(
'name', 'Font Flag', 'description', '', -- better description
'values', {'OUTLINE', 'Outline', 'THICKOUTLINE', 'Thick Outline', 'MONOCHROME', 'Monochrome', 'nil', 'None'},
'default', 'OUTLINE',
'current', pMinimapDB.fontflag,
'setFunc', function(value)
pMinimapDB.fontflag = value
pMinimap.Mail:SetFont(pMinimapDB.font, pMinimapDB.fontsize, value)
MinimapZoneText:SetFont(pMinimapDB.font, pMinimapDB.fontsize, value)
if(pMinimapDB.clock) then
TimeManagerClockTicker:SetFont(pMinimapDB.font, pMinimapDB.fontsize, value)
end
if(pMinimapDB.coords) then
pMinimap.Coord.Text:SetFont(pMinimapDB.font, pMinimapDB.fontsize, value)
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 265, -340)
self:MakeDropDown(
'name', 'ZoneText Point', 'description', '',
'values', {'TOP', 'Top', 'BOTTOM', 'Bottom'},
'default', 'TOP',
'current', pMinimapDB.zonePoint2,
'setFunc', function(value)
pMinimapDB.zonePoint2 = value
MinimapZoneTextButton:ClearAllPoints()
if(value == 'TOP') then
pMinimapDB.zonePoint1 = 'BOTTOM'
MinimapZoneTextButton:SetPoint('BOTTOM', Minimap, value, 0, pMinimapDB.zoneOffset)
else
pMinimapDB.zonePoint1 = 'TOP'
MinimapZoneTextButton:SetPoint('TOP', Minimap, value, 0, pMinimapDB.zoneOffset)
end
end
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 265, -270)
end)
\ No newline at end of file