chat: rework combatlog parenting

This commit is contained in:
shagu
2017-08-20 23:46:18 +02:00
parent 6cc55a206a
commit 4a0e16ba06
+8 -2
View File
@@ -314,9 +314,9 @@ pfUI:RegisterModule("chat", function ()
if i == 1 then if i == 1 then
-- General -- General
FCF_DockFrame(frame)
tab:SetParent(pfUI.chat.left.panelTop) tab:SetParent(pfUI.chat.left.panelTop)
frame:SetParent(pfUI.chat.left) frame:SetParent(pfUI.chat.left)
frame.isDocked = true
frame:SetPoint("TOPLEFT", pfUI.chat.left ,"TOPLEFT", default_border, -panelheight) frame:SetPoint("TOPLEFT", pfUI.chat.left ,"TOPLEFT", default_border, -panelheight)
frame:SetPoint("BOTTOMRIGHT", pfUI.chat.left ,"BOTTOMRIGHT", -default_border, panelheight) frame:SetPoint("BOTTOMRIGHT", pfUI.chat.left ,"BOTTOMRIGHT", -default_border, panelheight)
elseif i == 2 then elseif i == 2 then
@@ -324,8 +324,12 @@ pfUI:RegisterModule("chat", function ()
if C.chat.global.combathide == "1" then if C.chat.global.combathide == "1" then
FCF_UnDockFrame(frame) FCF_UnDockFrame(frame)
FCF_Close(frame) FCF_Close(frame)
elseif not frame.isDocked and not frame:IsVisible() then elseif frame.isDocked then
FCF_DockFrame(frame) FCF_DockFrame(frame)
tab:SetParent(pfUI.chat.left.panelTop)
frame:SetParent(pfUI.chat.left)
frame:SetPoint("TOPLEFT", pfUI.chat.left ,"TOPLEFT", default_border, -panelheight)
frame:SetPoint("BOTTOMRIGHT", pfUI.chat.left ,"BOTTOMRIGHT", -default_border, panelheight)
end end
elseif i == 3 and C.chat.right.enable == "1" then elseif i == 3 and C.chat.right.enable == "1" then
-- Loot & Spam -- Loot & Spam
@@ -337,6 +341,8 @@ pfUI:RegisterModule("chat", function ()
frame:Show() frame:Show()
end end
FCF_DockUpdate()
-- hide textures -- hide textures
for j,v in ipairs({tab:GetRegions()}) do for j,v in ipairs({tab:GetRegions()}) do
if j==5 then v:SetTexture(0,0,0,0) end if j==5 then v:SetTexture(0,0,0,0) end