From 14e285b62f092cdc31706ff6be4cd25cb8866f5d Mon Sep 17 00:00:00 2001 From: Repooc Date: Sat, 23 Feb 2013 23:03:13 -0500 Subject: [PATCH] Move coord location to select box. --- ElvUI_SLE/config/profile.lua | 2 +- ElvUI_SLE/modules/minimap/minimapcoords.lua | 6 +++--- ElvUI_SLE/modules/minimap/options.lua | 15 ++++++++++++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ElvUI_SLE/config/profile.lua b/ElvUI_SLE/config/profile.lua index 0638adc..61552d2 100644 --- a/ElvUI_SLE/config/profile.lua +++ b/ElvUI_SLE/config/profile.lua @@ -156,7 +156,7 @@ P['sle'] = { ['enable'] = false, ['coords'] = { ['display'] = "SHOW", - ['middle'] = false, + ['middle'] = "CORNERS", }, ['buttons'] = { ['anchor'] = "NOANCHOR", diff --git a/ElvUI_SLE/modules/minimap/minimapcoords.lua b/ElvUI_SLE/modules/minimap/minimapcoords.lua index dc95a32..b9433e6 100644 --- a/ElvUI_SLE/modules/minimap/minimapcoords.lua +++ b/ElvUI_SLE/modules/minimap/minimapcoords.lua @@ -11,7 +11,7 @@ local function UpdateCoords(self, elapsed) if panel.elapsed < .1 then return end xpos.pos, ypos.pos = GetPlayerMapPosition('player') - xpos.text:SetFormattedText(E.db.sle.minimap.middle and '%.2f/' or '%.2f', xpos.pos * 100) + xpos.text:SetFormattedText(E.db.sle.minimap.middle == "CENTER" and '%.2f/' or '%.2f', xpos.pos * 100) ypos.text:SetFormattedText('%.2f', ypos.pos * 100) panel.elapsed = 0 @@ -20,12 +20,12 @@ end local function UpdatePosition(middle) xpos:ClearAllPoints() ypos:ClearAllPoints() - if middle then + if middle == "CENTER" then xpos:Point('BOTTOMRIGHT', panel, 'BOTTOM',10, 0) else xpos:Point('LEFT', panel, 'LEFT', 2, 0) end - if middle then + if middle == "CENTER" then ypos:Point('BOTTOMLEFT', panel, 'BOTTOM', 0, 0) else ypos:Point('RIGHT', panel, 'RIGHT', 2, 0) diff --git a/ElvUI_SLE/modules/minimap/options.lua b/ElvUI_SLE/modules/minimap/options.lua index 1d42f45..45bcba8 100644 --- a/ElvUI_SLE/modules/minimap/options.lua +++ b/ElvUI_SLE/modules/minimap/options.lua @@ -45,13 +45,26 @@ local function configTable() }, middle = { order = 3, + type = "select", + name = L["Coords Location"], + desc = L['This will determine where the coords are shown on the minimap.'], + get = function(info) return E.db.sle.minimap.middle end, + set = function(info, value) E.db.sle.minimap.middle = value; E:GetModule('Minimap'):UpdateSettings() end, + values = { + ['CORNERS'] = L['Bottom Corners'], + ['CENTER'] = L['Bottom Center'], + }, + disabled = function() return not E.db.sle.minimap.enable end, + }, + --[[middle = { + order = 3, type = "toggle", name = L["Coords in the middle"], desc = L['If enabled will show coordinates in the center of minimaps lower border. Otherwise in the lower corners.'], disabled = function() return not E.db.sle.minimap.enable end, get = function(info) return E.db.sle.minimap.middle end, set = function(info, value) E.db.sle.minimap.middle = value; E:GetModule('Minimap'):UpdateSettings() end, - }, + },]] }, }, buttons = { -- 1.7.9.5