mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-06 13:40:00 +00:00
chat: use parent to determine docked state
Remove every texture of the chat frame and only restore background for chat frames that are not docked to the left or the right side.
This commit is contained in:
+18
-11
@@ -334,17 +334,6 @@ pfUI:RegisterModule("chat", "vanilla:tbc", function ()
|
||||
frame.pfCombatLog = nil
|
||||
end
|
||||
|
||||
for _, tex in pairs(CHAT_FRAME_TEXTURES) do
|
||||
local texture = _G["ChatFrame"..i..tex]
|
||||
texture.oldTexture = texture.oldTexture or texture:GetTexture()
|
||||
|
||||
if i == 3 or frame.isDocked then
|
||||
texture:SetTexture()
|
||||
texture:Hide()
|
||||
else
|
||||
texture:SetTexture(texture.oldTexture)
|
||||
end
|
||||
end
|
||||
|
||||
if not frame.pfStartMoving then
|
||||
frame.pfStartMoving = frame.StartMoving
|
||||
@@ -408,6 +397,24 @@ pfUI:RegisterModule("chat", "vanilla:tbc", function ()
|
||||
v:SetHeight(C.global.font_size+default_border*2)
|
||||
end
|
||||
|
||||
-- remove background on docked frames
|
||||
for _, tex in pairs(CHAT_FRAME_TEXTURES) do
|
||||
local texture = _G["ChatFrame"..i..tex]
|
||||
if tex == "Background" then
|
||||
texture.oldTexture = texture.oldTexture or texture:GetTexture()
|
||||
if frame:GetParent() == pfUI.chat.left or frame:GetParent() == pfUI.chat.right then
|
||||
texture:SetTexture()
|
||||
texture:Hide()
|
||||
else
|
||||
texture:SetTexture(texture.oldTexture)
|
||||
texture:Show()
|
||||
end
|
||||
else
|
||||
texture:SetTexture()
|
||||
texture:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
_G["ChatFrame" .. i .. "ResizeBottom"]:Hide()
|
||||
_G["ChatFrame" .. i .. "TabText"]:SetJustifyV("CENTER")
|
||||
_G["ChatFrame" .. i .. "TabText"]:SetHeight(C.global.font_size+default_border*2)
|
||||
|
||||
Reference in New Issue
Block a user