Quantcast

Changed the logic on instance indicator for #217

Darthpred [07-23-16 - 10:04]
Changed the logic on instance indicator for #217
Filename
CHANGELOG.txt
ElvUI_SLE/core/install.lua
ElvUI_SLE/defaults/profile.lua
ElvUI_SLE/modules/minimap/instance.lua
ElvUI_SLE/options/minimap/instance_c.lua
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 5c4373d..3b2169f 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,7 @@
+v3.06
+Changes:
+- Changed the logic for instance indicator. Now show Icon option is no longer needed and was removed (previously locked under advanced). Now the flag texture automatically hides when indicator is inabled.
+
 v3.05 07/23/2016
 Fixes:
 - Fixed easy cast fishing not respecting ignore pole option
diff --git a/ElvUI_SLE/core/install.lua b/ElvUI_SLE/core/install.lua
index c12f933..8b10981 100644
--- a/ElvUI_SLE/core/install.lua
+++ b/ElvUI_SLE/core/install.lua
@@ -496,7 +496,6 @@ function PI:DarthSetup()
 		E.db["sle"]["minimap"]["locPanel"]["enable"] = true
 		E.db["sle"]["minimap"]["locPanel"]["width"] = 310
 		E.db["sle"]["minimap"]["instance"]["enable"] = true
-		E.db["sle"]["minimap"]["instance"]["flag"] = false
 		E.db["sle"]["quests"]["visibility"]["rested"] = "COLLAPSED"
 		E.db["sle"]["quests"]["visibility"]["garrison"] = "COLLAPSED"
 		E.db["sle"]["quests"]["autoReward"] = true
diff --git a/ElvUI_SLE/defaults/profile.lua b/ElvUI_SLE/defaults/profile.lua
index 04fe390..6ed91bb 100644
--- a/ElvUI_SLE/defaults/profile.lua
+++ b/ElvUI_SLE/defaults/profile.lua
@@ -503,7 +503,6 @@ P["sle"] = {
 		},
 		["instance"] = {
 			["enable"] = false,
-			["flag"] = true,
 			["xoffset"] = -10,
 			["yoffset"] = 0,
 			["colors"] = {
diff --git a/ElvUI_SLE/modules/minimap/instance.lua b/ElvUI_SLE/modules/minimap/instance.lua
index 0e3e452..5361332 100644
--- a/ElvUI_SLE/modules/minimap/instance.lua
+++ b/ElvUI_SLE/modules/minimap/instance.lua
@@ -73,9 +73,9 @@ end
 function I:UpdateFrame()
 	local db = I.db
 	if T.IsInInstance() then
-		if not db.flag then
+		if db.enable then
 			_G["MiniMapInstanceDifficulty"]:Hide()
-		elseif db.flag and not _G["MiniMapInstanceDifficulty"]:IsShown() then
+		elseif not db.enable and not _G["MiniMapInstanceDifficulty"]:IsShown() then
 			_G["MiniMapInstanceDifficulty"]:Show()
 		end
 	end
@@ -124,8 +124,9 @@ end
 function I:Initialize()
 	if not SLE.initialized or not E.private.general.minimap.enable then return end
 	I.db = E.db.sle.minimap.instance
+	I.db.flag = nil
 	self:CreateText()
-	_G["MiniMapInstanceDifficulty"]:HookScript("OnShow", function(self) if not I.db.flag then self:Hide() end end)
+	_G["MiniMapInstanceDifficulty"]:HookScript("OnShow", function(self) if I.db.enable then self:Hide() end end)
 	self:RegisterEvent("PLAYER_ENTERING_WORLD", "GenerateText")
 	self:RegisterEvent("ZONE_CHANGED_NEW_AREA", "GenerateText")
 	self:RegisterEvent("GUILD_PARTY_STATE_UPDATED", "GenerateText")
diff --git a/ElvUI_SLE/options/minimap/instance_c.lua b/ElvUI_SLE/options/minimap/instance_c.lua
index 7be9bdc..8d5ecf9 100644
--- a/ElvUI_SLE/options/minimap/instance_c.lua
+++ b/ElvUI_SLE/options/minimap/instance_c.lua
@@ -19,14 +19,6 @@ local function configTable()
 				desc = L["Show instance difficulty info as text."],
 				disabled = function() return not E.private.general.minimap.enable end,
 			},
-			flag = {
-				order = 2,
-				type = 'toggle',
-				name = L["Show texture"],
-				desc = L["Show instance difficulty info as default texture."],
-				hidden = function() return not E.global.sle.advanced.general end,
-				disabled = function() return not E.private.general.minimap.enable end,
-			},
 			xoffset = {
 				order = 3, type = 'range', name = L["X-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,