Commit 64b007e6 authored by Benik's avatar Benik

Fixed Chat EditBox when assigned on the Middle Datatext

parent 59f473d0
......@@ -2,6 +2,7 @@
local CH = E:GetModule('Chat')
local BL = BUI:GetModule('Layout')
local FM = BUI:GetModule('FlightMode')
local mod = BUI:NewModule('Chat', 'AceHook-3.0', 'AceEvent-3.0')
local _G = _G
local pairs = pairs
......@@ -15,10 +16,11 @@ local IsMouseButtonDown = IsMouseButtonDown
-- GLOBALS: CHAT_FRAMES, RightChatDataPanel, LeftChatDataPanel, BuiDummyChat, RightChatPanel, LeftChatPanel, LeftChatTab
-- Place the new chat frame
local function UpdateEditboxAnchors()
function mod:UpdateEditboxAnchors()
for _, frameName in pairs(CHAT_FRAMES) do
local frame = _G[frameName..'EditBox']
if not frame then break; end
frame:ClearAllPoints()
if E.db.datatexts.leftChatPanel and E.db.chat.editBoxPosition == 'BELOW_CHAT' then
frame:SetAllPoints(LeftChatDataPanel)
elseif E.db.benikui.datatexts.chat.enable and BuiDummyChat and E.db.benikui.datatexts.chat.editBoxPosition == 'BELOW_CHAT' then
......@@ -35,8 +37,6 @@ local function UpdateEditboxAnchors()
frame:SetAllPoints(LeftChatTab)
end
end
--CH:PositionChat(true)
end
local CreatedFrames = 0;
......@@ -94,6 +94,12 @@ local function PositionChat(self, override)
end
end
hooksecurefunc(CH, "PositionChats", PositionChat)
hooksecurefunc(CH, "UpdateEditboxAnchors", UpdateEditboxAnchors)
hooksecurefunc(FM, "SetFlightMode", PositionChat)
\ No newline at end of file
function mod:Initialize()
hooksecurefunc(CH, "PositionChats", PositionChat)
hooksecurefunc(CH, "UpdateEditboxAnchors", UpdateEditboxAnchors)
hooksecurefunc(CH, "StyleChat", Style)
hooksecurefunc(FM, "SetFlightMode", PositionChat)
mod.UpdateEditboxAnchors()
end
BUI:RegisterModule(mod:GetName())
\ No newline at end of file
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