diff --git a/ElvUI_SLE/modules/minimap/minimapcoords.lua b/ElvUI_SLE/modules/minimap/minimapcoords.lua index f7abfdc..79268b9 100644 --- a/ElvUI_SLE/modules/minimap/minimapcoords.lua +++ b/ElvUI_SLE/modules/minimap/minimapcoords.lua @@ -38,12 +38,12 @@ local function CreateCoordsFrame() ypos.text:FontTemplate(E.media.font, 12, "OUTLINE") ypos.text:SetAllPoints(ypos) Minimap:HookScript('OnEnter', function(self) - if E.db.general.minimap.locationText ~= 'MOUSEOVER' or not E.private.general.minimap.enable then return; end + if E.db.sle.minimap.coords.display ~= 'MOUSEOVER' or not E.private.general.minimap.enable or not E.db.sle.minimap.enable then return; end panel:Show() end) Minimap:HookScript('OnLeave', function(self) - if E.db.general.minimap.locationText ~= 'MOUSEOVER' or not E.private.general.minimap.enable then return; end + if E.db.sle.minimap.coords.display ~= 'MOUSEOVER' or not E.private.general.minimap.enable or not E.db.sle.minimap.enable then return; end panel:Hide() end) framescreated = true @@ -60,7 +60,7 @@ function M:UpdateSettings() panel:SetPoint('BOTTOM', Minimap, 'BOTTOM', 0, -(E.PixelMode and 1 or 2)) panel:Size(E.MinimapSize, 22) panel:SetScript('OnUpdate', UpdateCoords) - if E.db.general.minimap.locationText ~= 'SHOW' or not E.private.general.minimap.enable then + if E.db.sle.minimap.coords.display ~= 'SHOW' or not E.private.general.minimap.enable or not E.db.sle.minimap.enable then panel:Hide() else panel:Show() diff --git a/ElvUI_SLE/modules/minimap/options.lua b/ElvUI_SLE/modules/minimap/options.lua index 7481bcd..fee9c76 100644 --- a/ElvUI_SLE/modules/minimap/options.lua +++ b/ElvUI_SLE/modules/minimap/options.lua @@ -1,6 +1,55 @@ local E, L, V, P, G, _ = unpack(ElvUI); --Inport: Engine, Locales, PrivateDB, ProfileDB, GlobalDB, Localize Underscore local function configTable() + E.Options.args.sle.args.minimap = { + type = "group", + name = L["Minimap"], + order = 2, + disabled = function() return not E.private.general.minimap.enable end, + args = { + header = { + order = 1, + type = "header", + name = L["Minimap Options"], + }, + intro = { + order = 2, + type = 'description', + name = L['MINIMAP_DESC'], + }, + enable = { + order = 3, + type = "toggle", + name = L["Enable"], + desc = L["Enable/Disable Minimap Options"], + get = function(info) return E.db.sle.minimap.enable end, + set = function(info, value) E.db.sle.minimap.enable = value; E:GetModule('Minimap'):UpdateSettings() end + }, + coords = { + type = "group", + name = L["Minimap Coordinates"], + order = 4, + guiInline = true, + disabled = function() return not E.db.sle.minimap.enable end, + args = { + display = { + order = 3, + type = 'select', + name = L['Coords Display'], + desc = L['Change settings for the display of the coordinates that are on the minimap.'], + get = function(info) return E.db.sle.minimap.coords.display end, + set = function(info, value) E.db.sle.minimap.coords.display = value; E:GetModule('Minimap'):UpdateSettings() end, + values = { + ['MOUSEOVER'] = L['Minimap Mouseover'], + ['SHOW'] = L['Always Display'], + ['HIDE'] = L['Hide'], + }, + --disabled = function() return not E.private.general.minimap.enable end, + }, + }, + }, + }, + } end table.insert(E.SLEConfigs, configTable) \ No newline at end of file