From 730545624ab54f3c0163f27d8f04265c739fdeef Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 18 Sep 2016 22:57:35 +0200 Subject: [PATCH] chat: force chat positions on reconf --- modules/chat.lua | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/modules/chat.lua b/modules/chat.lua index ab77292b..d72ea392 100644 --- a/modules/chat.lua +++ b/modules/chat.lua @@ -187,22 +187,30 @@ pfUI:RegisterModule("chat", function () end function pfUI.chat.SetupPositions() + -- set position of Main Window + ChatFrame1:ClearAllPoints() + ChatFrame1:SetPoint("TOPLEFT", pfUI.chat.left ,"TOPLEFT", 5, -25) + ChatFrame1:SetPoint("BOTTOMRIGHT", pfUI.chat.left ,"BOTTOMRIGHT", -5, 25) + FCF_SetLocked(ChatFrame1, 1) FCF_SetWindowColor(ChatFrame1, 0, 0, 0); FCF_SetWindowAlpha(ChatFrame1, 0); FCF_SetChatWindowFontSize(ChatFrame1, 12) - - FCF_SetLocked(ChatFrame3, 1) - FCF_SetWindowColor(ChatFrame3, 0, 0, 0); - FCF_SetWindowAlpha(ChatFrame3, 0); - FCF_SetChatWindowFontSize(ChatFrame3, 12) - - FCF_SetWindowName(ChatFrame3, "Loot & Spam", 1 ) - FCF_UnDockFrame(ChatFrame3) + -- set position of Loot & Spam if not ChatFrame3.isDocked == 1 or not ChatFrame3:IsShown() then FCF_OpenNewWindow("Loot & Spam") end + FCF_SetWindowColor(ChatFrame3, 0, 0, 0); + FCF_SetWindowAlpha(ChatFrame3, 0); + FCF_SetChatWindowFontSize(ChatFrame3, 12) + FCF_SetWindowName(ChatFrame3, "Loot & Spam", 1 ) + FCF_UnDockFrame(ChatFrame3) + ChatFrame3:ClearAllPoints() + ChatFrame3:SetPoint("TOPLEFT", pfUI.chat.right ,"TOPLEFT", 5, -25) + ChatFrame3:SetPoint("BOTTOMRIGHT", pfUI.chat.right ,"BOTTOMRIGHT", -5, 25) + FCF_SetLocked(ChatFrame3, 1) + -- save positions on logout ChatFrame1:SetUserPlaced(1); ChatFrame3:SetUserPlaced(1); end