Commit d2eed21c authored by Simpy's avatar Simpy 🐹
Browse files

chat panels when the chat is off, these are intended to work when the chat...

chat panels when the chat is off, these are intended to work when the chat module is disalbed for the battle stats dt but also you can use the panel if you want for details or something if you wanted without using our chat
parent 3a7b13d1
......@@ -1146,8 +1146,6 @@ function CH:PositionChat(chat)
end
function CH:PositionChats()
if not E.private.chat.enable then return end
_G.LeftChatPanel:SetSize(CH.db.panelWidth, CH.db.panelHeight)
if CH.db.separateSizes then
_G.RightChatPanel:SetSize(CH.db.panelWidthRight, CH.db.panelHeightRight)
......@@ -1157,6 +1155,9 @@ function CH:PositionChats()
LO:RepositionChatDataPanels()
-- dont proceed when chat is disabled
if not E.private.chat.enable then return end
for _, name in ipairs(_G.CHAT_FRAMES) do
CH:PositionChat(_G[name])
end
......@@ -3085,14 +3086,15 @@ function CH:Initialize()
CH:DelayGuildMOTD() -- Keep this before `is Chat Enabled` check
CH.db = E.db.chat
if not E.private.chat.enable then
-- if the chat module is off we still need to spawn the dts for the panels
-- if we are going to have the panels show even when it's disabled
LO:RepositionChatDataPanels()
CH:PositionChats()
CH:Panels_ColorUpdate()
return
end
CH.Initialized = true
CH.db = E.db.chat
if not ElvCharacterDB.ChatEditHistory then ElvCharacterDB.ChatEditHistory = {} end
if not ElvCharacterDB.ChatHistoryLog or not CH.db.chatHistory then ElvCharacterDB.ChatHistoryLog = {} end
......
......@@ -35,7 +35,7 @@ E.Options.args.chat = {
order = 3,
type = 'group',
name = L["General"],
disabled = function() return not E.Chat.Initialized; end,
disabled = function() return not E.Chat.Initialized end,
args = {
url = {
order = 1,
......@@ -323,7 +323,7 @@ E.Options.args.chat = {
order = 75,
type = 'group',
name = L["Text Fade"],
disabled = function() return not E.Chat.Initialized; end,
disabled = function() return not E.Chat.Initialized end,
set = function(info, value) E.db.chat[info[#info]] = value; CH:UpdateFading() end,
args = {
fade = {
......@@ -346,7 +346,7 @@ E.Options.args.chat = {
order = 80,
type = 'group',
name = L["Fonts"],
disabled = function() return not E.Chat.Initialized; end,
disabled = function() return not E.Chat.Initialized end,
set = function(info, value) E.db.chat[info[#info]] = value; CH:SetupChat() end,
args = {
font = {
......@@ -387,7 +387,7 @@ E.Options.args.chat = {
order = 85,
type = 'group',
name = L["Alerts"],
disabled = function() return not E.Chat.Initialized; end,
disabled = function() return not E.Chat.Initialized end,
args = {
noAlertInCombat = {
order = 1,
......@@ -551,7 +551,7 @@ E.Options.args.chat = {
order = 100,
type = 'group',
name = L["Class Color Mentions"],
disabled = function() return not E.Chat.Initialized; end,
disabled = function() return not E.Chat.Initialized end,
args = {
classColorMentionsChat = {
order = 1,
......@@ -601,13 +601,13 @@ E.Options.args.chat = {
order = 5,
type = 'group',
name = L["Panels"],
disabled = function() return not E.Chat.Initialized; end,
args = {
fadeUndockedTabs = {
order = 1,
type = 'toggle',
name = L["Fade Undocked Tabs"],
desc = L["Fades the text on chat tabs that are not docked at the left or right chat panel."],
hidden = function() return not E.Chat.Initialized end,
set = function(self, value)
E.db.chat.fadeUndockedTabs = value;
CH:UpdateChatTabs()
......@@ -618,6 +618,7 @@ E.Options.args.chat = {
type = 'toggle',
name = L["Fade Tabs No Backdrop"],
desc = L["Fades the text on chat tabs that are docked in a panel where the backdrop is disabled."],
hidden = function() return not E.Chat.Initialized end,
set = function(self, value)
E.db.chat.fadeTabsNoBackdrop = value;
CH:UpdateChatTabs()
......@@ -649,6 +650,7 @@ E.Options.args.chat = {
type = 'group',
guiInline = true,
name = L["Tab Panels"],
hidden = function() return not E.Chat.Initialized end,
args = {
panelTabTransparency = {
order = 1,
......@@ -786,6 +788,7 @@ E.Options.args.chat = {
type = 'toggle',
name = L["Panel Snapping"],
desc = L["When disabled the Chat Background color has to be set via Blizzards Chat Tabs Background setting."],
hidden = function() return not E.Chat.Initialized end,
set = function(info, value)
E.db.chat.panelSnapping = value
CH:PositionChats()
......
......@@ -612,7 +612,10 @@ E.Options.args.datatexts = {
_G.HideLeftChat()
end
Chat:UpdateEditboxAnchors()
if E.private.chat.enable then
Chat:UpdateEditboxAnchors()
end
Layout:ToggleChatPanels()
Layout:SetDataPanelStyle()
DT:UpdatePanelInfo('LeftChatDataPanel')
......@@ -654,7 +657,10 @@ E.Options.args.datatexts = {
_G.HideRightChat()
end
Chat:UpdateEditboxAnchors()
if E.private.chat.enable then
Chat:UpdateEditboxAnchors()
end
Layout:ToggleChatPanels()
Layout:SetDataPanelStyle()
DT:UpdatePanelInfo('RightChatDataPanel')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment