diff --git a/ElvUI_SLE/modules/chat.lua b/ElvUI_SLE/modules/chat.lua
index 1028653..e2c4f3a 100644
--- a/ElvUI_SLE/modules/chat.lua
+++ b/ElvUI_SLE/modules/chat.lua
@@ -151,158 +151,53 @@ local specialChatIcons = {
SLE.SpecialChatIcons = specialChatIcons
-CH.StyleChatSLE = CH.StyleChat
-function CH:StyleChat(frame)
- CH:StyleChatSLE(frame)
+local function Style(self, frame)
CreatedFrames = frame:GetID()
end
--Replacement of chat tab position and size function
local PixelOff = E.PixelMode and 31 or 27
-function CH:PositionChat(override)
- if not self.db.lockPositions or ((InCombatLockdown() and not override and self.initialMove) or (IsMouseButtonDown("LeftButton") and not override)) then return end
- if not RightChatPanel or not LeftChatPanel then return; end
- RightChatPanel:SetSize(E.db.chat.panelWidth, E.db.chat.panelHeight)
- LeftChatPanel:SetSize(E.db.chat.panelWidth, E.db.chat.panelHeight)
-
- if E.private.chat.enable ~= true then return end
-
- local chat, chatbg, tab, id, point, button, isDocked, chatFound
- for _, frameName in pairs(CHAT_FRAMES) do
- chat = _G[frameName]
- id = chat:GetID()
- point = GetChatWindowSavedPosition(id)
-
- if point == "BOTTOMRIGHT" and chat:IsShown() then
- chatFound = true
- break
- end
+local function Position()
+ local BASE_OFFSET = 60
+ if E.PixelMode then
+ BASE_OFFSET = BASE_OFFSET - 3
end
-
- if chatFound then
- self.RightChatWindowID = id
- else
- self.RightChatWindowID = nil
- end
-
+ local chat, id, isDocked, point
for i=1, CreatedFrames do
- local BASE_OFFSET = 60
- if E.PixelMode then
- BASE_OFFSET = BASE_OFFSET - 3
- end
chat = _G[format("ChatFrame%d", i)]
- chatbg = format("ChatFrame%dBackground", i)
- button = _G[format("ButtonCF%d", i)]
id = chat:GetID()
tab = _G[format("ChatFrame%sTab", i)]
point = GetChatWindowSavedPosition(id)
isDocked = chat.isDocked
- tab.isDocked = chat.isDocked
- tab.owner = chat
- if id > NUM_CHAT_WINDOWS then
+ --[[if id > NUM_CHAT_WINDOWS then
point = point or select(1, chat:GetPoint());
if select(2, tab:GetPoint()):GetName() ~= bg then
isDocked = true
else
isDocked = false
end
- end
-
-
- if point == "BOTTOMRIGHT" and chat:IsShown() and not (id > NUM_CHAT_WINDOWS) and id == self.RightChatWindowID then
+ end]]
+ if point == "BOTTOMRIGHT" and chat:IsShown() and not (id > NUM_CHAT_WINDOWS) and id == CH.RightChatWindowID then
chat:ClearAllPoints()
if E.db.sle.datatext.chathandle then
if E.db.datatexts.rightChatPanel then
- chat:Point("BOTTOMRIGHT", RightChatDataPanel, "TOPRIGHT", 10, 3) -- <<< Changed
- else
- BASE_OFFSET = BASE_OFFSET - 24
- chat:Point("BOTTOMLEFT", RightChatPanel, "BOTTOMLEFT", 4, 4)
+ chat:Point("BOTTOMRIGHT", RightChatDataPanel, "TOPRIGHT", 10, 3)
end
if id ~= 2 then
- chat:SetSize(E.db.chat.panelWidth - 11, (E.db.chat.panelHeight - PixelOff)) -- <<< Changed
- else
- chat:Size(E.db.chat.panelWidth - 11, (E.db.chat.panelHeight - PixelOff) - CombatLogQuickButtonFrame_Custom:GetHeight())
- end
- else
- if E.db.datatexts.rightChatPanel then
- chat:SetPoint("BOTTOMLEFT", RightChatDataPanel, "TOPLEFT", 1, 3)
- else
- BASE_OFFSET = BASE_OFFSET - 24
- chat:SetPoint("BOTTOMLEFT", RightChatDataPanel, "BOTTOMLEFT", 1, 1)
+ chat:SetSize(E.db.chat.panelWidth - 11, (E.db.chat.panelHeight - PixelOff))
end
- if id ~= 2 then
- chat:SetSize(E.db.chat.panelWidth - 11, (E.db.chat.panelHeight - BASE_OFFSET))
- else
- chat:SetSize(E.db.chat.panelWidth - 11, (E.db.chat.panelHeight - BASE_OFFSET) - CombatLogQuickButtonFrame_Custom:GetHeight())
- end
- end
-
-
-
- FCF_SavePositionAndDimensions(chat)
-
- tab:SetParent(RightChatPanel)
- chat:SetParent(RightChatPanel)
-
- if chat:IsMovable() then
- chat:SetUserPlaced(true)
- end
- if E.db.chat.panelBackdrop == 'HIDEBOTH' or E.db.chat.panelBackdrop == 'LEFT' then
- CH:SetupChatTabs(tab, true)
- else
- CH:SetupChatTabs(tab, false)
end
elseif not isDocked and chat:IsShown() then
- tab:SetParent(UIParent)
- chat:SetParent(UIParent)
-
- CH:SetupChatTabs(tab, true)
+
else
if E.db.sle.datatext.chathandle then
if id ~= 2 and not (id > NUM_CHAT_WINDOWS) then
- chat:ClearAllPoints()
- if E.db.datatexts.leftChatPanel then
- chat:Point("BOTTOMLEFT", LeftChatToggleButton, "TOPLEFT", 5, 3)
- else
- BASE_OFFSET = BASE_OFFSET - 24
- chat:Point("BOTTOMLEFT", LeftChatToggleButton, "TOPLEFT", 5, 3)
- end
- chat:Size(E.db.chat.panelWidth - 11, (E.db.chat.panelHeight - PixelOff)) -- <<< Changed
- FCF_SavePositionAndDimensions(chat)
- end
- else
- if id ~= 2 and not (id > NUM_CHAT_WINDOWS) then
- chat:ClearAllPoints()
- if E.db.datatexts.leftChatPanel then
- chat:SetPoint("BOTTOMLEFT", LeftChatToggleButton, "TOPLEFT", 1, 3)
- else
- BASE_OFFSET = BASE_OFFSET - 24
- chat:SetPoint("BOTTOMLEFT", LeftChatToggleButton, "BOTTOMLEFT", 1, 1)
- end
- chat:SetSize(E.db.chat.panelWidth - 11, (E.db.chat.panelHeight - BASE_OFFSET))
- FCF_SavePositionAndDimensions(chat)
+ chat:Size(E.db.chat.panelWidth - 11, (E.db.chat.panelHeight - PixelOff))
end
end
- chat:SetParent(LeftChatPanel)
- if i > 2 then
- tab:SetParent(GeneralDockManagerScrollFrameChild)
- else
- tab:SetParent(GeneralDockManager)
- end
- if chat:IsMovable() then
- chat:SetUserPlaced(true)
- end
-
- if E.db.chat.panelBackdrop == 'HIDEBOTH' or E.db.chat.panelBackdrop == 'RIGHT' then
- CH:SetupChatTabs(tab, true)
- else
- CH:SetupChatTabs(tab, false)
- end
- end
+ end
end
-
- self.initialMove = true;
end
local function GetBNFriendColor(name, id)
@@ -817,13 +712,6 @@ function CH:GMIconUpdate()
end
end
-hooksecurefunc(CH, "Initialize", function(self)
- if E.private.sle.guildmaster then
- self:RegisterEvent('GUILD_ROSTER_UPDATE', Roster)
- GMCheck()
- end
-end)
-
--Previously layout.lua
local LO = E:GetModule('Layout');
local PANEL_HEIGHT = 22;
@@ -910,4 +798,12 @@ local function CreateChatPanels()
end
hooksecurefunc(LO, "ToggleChatPanels", ChatPanels)
-hooksecurefunc(LO, "CreateChatPanels", CreateChatPanels)
\ No newline at end of file
+hooksecurefunc(LO, "CreateChatPanels", CreateChatPanels)
+hooksecurefunc(CH, "StyleChat", Style)
+hooksecurefunc(CH, "PositionChat", Position)
+hooksecurefunc(CH, "Initialize", function(self)
+ if E.private.sle.guildmaster then
+ self:RegisterEvent('GUILD_ROSTER_UPDATE', Roster)
+ GMCheck()
+ end
+end)
\ No newline at end of file