Quantcast

Option to show only numbers in instanse indicator. This closes #281

Darthpred [08-18-16 - 06:08]
Option to show only numbers in instanse indicator. This closes #281
Filename
ElvUI_SLE/defaults/profile.lua
ElvUI_SLE/locales/english.lua
ElvUI_SLE/locales/russian.lua
ElvUI_SLE/modules/minimap/instance.lua
ElvUI_SLE/options/minimap/instance_c.lua
diff --git a/ElvUI_SLE/defaults/profile.lua b/ElvUI_SLE/defaults/profile.lua
index 15b8511..5774946 100644
--- a/ElvUI_SLE/defaults/profile.lua
+++ b/ElvUI_SLE/defaults/profile.lua
@@ -462,6 +462,7 @@ P["sle"] = {
 			["enable"] = false,
 			["xoffset"] = -10,
 			["yoffset"] = 0,
+			["onlyNumber"] = false,
 			["colors"] = {
 				["lfr"] = {r = 0.32,g = 0.91,b = 0.25},
 				["normal"] = {r = 0.09,g = 0.51,b = 0.82},
diff --git a/ElvUI_SLE/locales/english.lua b/ElvUI_SLE/locales/english.lua
index d341911..ca88634 100644
--- a/ElvUI_SLE/locales/english.lua
+++ b/ElvUI_SLE/locales/english.lua
@@ -561,6 +561,7 @@ L["By default menu's width will be equal to the location panel width. Checking t
 L["Justify Text"] = true
 L["Hearthstone Location"] = true
 L["Show the name on location your Heathstone is bound to."] = true
+L["Only Number"] = true


 --Miscs
diff --git a/ElvUI_SLE/locales/russian.lua b/ElvUI_SLE/locales/russian.lua
index 2f9b878..050dcd1 100644
--- a/ElvUI_SLE/locales/russian.lua
+++ b/ElvUI_SLE/locales/russian.lua
@@ -553,6 +553,7 @@ L["By default menu's width will be equal to the location panel width. Checking t
 L["Justify Text"] = "Выравнивание тектса"
 L["Hearthstone Location"] = "Привязка камня"
 L["Show the name on location your Heathstone is bound to."] = "Показывать имя локации, к которой привязан камень возвращения."
+L["Only Number"] = "Только цифры"

 --Miscs
 L["Error Frame"] = "Фрейм ошибок"
diff --git a/ElvUI_SLE/modules/minimap/instance.lua b/ElvUI_SLE/modules/minimap/instance.lua
index d0f01c5..8f883fa 100644
--- a/ElvUI_SLE/modules/minimap/instance.lua
+++ b/ElvUI_SLE/modules/minimap/instance.lua
@@ -106,7 +106,7 @@ function I:GenerateText(event, guild, force)
 	else
 		local _, _, difficulty, difficultyName, _, _, _, _, instanceGroupSize = T.GetInstanceInfo()
 		local r, g, b = I:GetColor(difficulty)
-		if (difficulty >= 3 and difficulty <= 7) or difficulty == 9 then
+		if (difficulty >= 3 and difficulty <= 7) or difficulty == 9 or E.db.sle.minimap.instance.onlyNumber then
 			text = T.format("|cff%02x%02x%02x%s|r", r, g, b, instanceGroupSize)
 		else
 			difficultyName = sub(difficultyName, 1 , 1)
diff --git a/ElvUI_SLE/options/minimap/instance_c.lua b/ElvUI_SLE/options/minimap/instance_c.lua
index 8d5ecf9..ca7ae64 100644
--- a/ElvUI_SLE/options/minimap/instance_c.lua
+++ b/ElvUI_SLE/options/minimap/instance_c.lua
@@ -27,8 +27,15 @@ local function configTable()
 				order = 4, type = 'range', name = L["Y-Offset"], min = -300, max = 300, step = 1,
 				disabled = function() return not E.private.general.minimap.enable or not E.db.sle.minimap.instance.enable end,
 			},
-			fontGroup = {
+			onlyNumber = {
 				order = 5,
+				type = 'toggle',
+				name = L["Only Number"],
+				disabled = function() return not E.private.general.minimap.enable or not E.db.sle.minimap.instance.enable end,
+				set = function(info, value) E.db.sle.minimap.instance[ info[#info] ] = value; I:GenerateText(nil, nil, true) end,
+			},
+			fontGroup = {
+				order = 6,
 				type = "group",
 				name = L["Fonts"],
 				guiInline = true,