I can sence that in future people will bitch about this option being only toggle for both panels.
Darthpred [04-23-15 - 21:19]
I can sence that in future people will bitch about this option being only toggle for both panels.
diff --git a/ElvUI_SLE/defaults/profile.lua b/ElvUI_SLE/defaults/profile.lua
index cb85114..d5704eb 100644
--- a/ElvUI_SLE/defaults/profile.lua
+++ b/ElvUI_SLE/defaults/profile.lua
@@ -125,7 +125,7 @@ P['sle'] = {
['enable'] = false,
['alpha'] = 0.5,
},
- ['combathide'] = false,
+ ['combathide'] = "NONE",
},
--Combat Icon
diff --git a/ElvUI_SLE/modules/chat.lua b/ElvUI_SLE/modules/chat.lua
index 5f9a5bc..740c35f 100644
--- a/ElvUI_SLE/modules/chat.lua
+++ b/ElvUI_SLE/modules/chat.lua
@@ -449,17 +449,25 @@ function CH:SpamFilter()
end
function CH:Combat(event)
- if not E.db.sle.chat.combathide then return end
+ if E.db.sle.chat.combathide == "NONE" then return end
if event == "PLAYER_REGEN_DISABLED" then
- RightChatPanel:Hide()
- RightChatToggleButton:Hide()
- LeftChatPanel:Hide()
- LeftChatToggleButton:Hide()
+ if E.db.sle.chat.combathide == "BOTH" or E.db.sle.chat.combathide == "RIGHT" then
+ RightChatPanel:Hide()
+ RightChatToggleButton:Hide()
+ end
+ if E.db.sle.chat.combathide == "BOTH" or E.db.sle.chat.combathide == "LEFT" then
+ LeftChatPanel:Hide()
+ LeftChatToggleButton:Hide()
+ end
elseif event == "PLAYER_REGEN_ENABLED" then
- RightChatPanel:Show()
- RightChatToggleButton:Show()
- LeftChatPanel:Show()
- LeftChatToggleButton:Show()
+ if not RightChatPanel:IsShown() then
+ RightChatPanel:Show()
+ RightChatToggleButton:Show()
+ end
+ if not LeftChatPanel:IsShown() then
+ LeftChatPanel:Show()
+ LeftChatToggleButton:Show()
+ end
end
end
diff --git a/ElvUI_SLE/options/chat_c.lua b/ElvUI_SLE/options/chat_c.lua
index 066a434..5c8a0e2 100644
--- a/ElvUI_SLE/options/chat_c.lua
+++ b/ElvUI_SLE/options/chat_c.lua
@@ -60,10 +60,16 @@ local function configTable()
},
combathide = {
order = 8,
- type = "toggle",
+ type = "select",
name = L["Hide In Combat"],
get = function(info) return E.db.sle.chat.combathide end,
set = function(info, value) E.db.sle.chat.combathide = value; end,
+ values = {
+ ["NONE"] = NONE,
+ ["BOTH"] = L["Both"],
+ ["LEFT"] = L["Left"],
+ ["RIGHT"] = L["Right"],
+ }
},
textureAlpha = {
order = 10,