Skip to content

Commit

Permalink
chat: use parent to determine right docked state
Browse files Browse the repository at this point in the history
  • Loading branch information
shagu committed Oct 3, 2023
1 parent 866ebdc commit ad87c48
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions modules/chat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -408,6 +397,19 @@ 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]
texture.oldTexture = texture.oldTexture or texture:GetTexture()

if frame.isDocked or frame:GetParent() == pfUI.chat.right then
texture:SetTexture()
texture:Hide()
else
texture:SetTexture(texture.oldTexture)
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)
Expand Down

0 comments on commit ad87c48

Please sign in to comment.