Quantcast

Disable editbox positioning when ElvUI chat module is disabled

Darthpred [08-30-12 - 04:55]
Disable editbox positioning when ElvUI chat module is disabled
Filename
ElvUI_SLE/layout/layout.lua
ElvUI_SLE/modules/chat/options.lua
diff --git a/ElvUI_SLE/layout/layout.lua b/ElvUI_SLE/layout/layout.lua
index f6fe6a0..7dbe2a6 100644
--- a/ElvUI_SLE/layout/layout.lua
+++ b/ElvUI_SLE/layout/layout.lua
@@ -83,6 +83,7 @@ end

 --Repositioning function for editbox
 function LO:EditboxPos()
+	if not E.private.chat.enable then return end
 	for i = 1, NUM_CHAT_WINDOWS do
 		local editbox = _G["ChatFrame"..i.."EditBox"]
 		local parent
diff --git a/ElvUI_SLE/modules/chat/options.lua b/ElvUI_SLE/modules/chat/options.lua
index 9251243..a24e4ba 100644
--- a/ElvUI_SLE/modules/chat/options.lua
+++ b/ElvUI_SLE/modules/chat/options.lua
@@ -38,6 +38,7 @@ E.Options.args.sle.args.chat = {
 					type = "select",
 					name = L["Editbox Position"],
 					desc = L["Select if the editbox will be above or below chat."],
+					disabled = function() return not E.private.chat.enable end,
 					get = function(info) return E.db.sle.chat.editbox end,
 					set = function(info, value) E.db.sle.chat.editbox = value; E:GetModule('Layout'):EditboxPos() end,
 					values = {