Skip to content

Commit

Permalink
[Fixes #181] [Fixes #180] Missing scroll to bottom button on Cataclysm
Browse files Browse the repository at this point in the history
  • Loading branch information
plusmouse committed May 6, 2024
1 parent 28a8992 commit 548ee44
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions modules/Buttons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,16 @@ end
self:AdjustButtonFrames(self.db.profile.showButtons)

self:UpdateReminder()

self:MarkButtonFramesDirty()
end

function module:MarkButtonFramesDirty()
for name, frame in pairs(Prat.Frames) do
if frame.buttonFrame and frame.buttonFrame.IsLayoutFrame and frame.buttonFrame:IsLayoutFrame() then
frame.buttonFrame:MarkDirty()
end
end
end

function module:OnModuleDisable()
Expand Down Expand Up @@ -332,7 +342,7 @@ end
bottomButton = _G[name .. "ButtonFrameBottomButton"]
bottomButton:SetScript("OnShow", hide)
bottomButton:Hide()
bottomButton:SetParent(frame)
--bottomButton:SetParent(frame)

bottomButton:SetScript("OnClick", function() frame:ScrollToBottom() end)
end
Expand Down Expand Up @@ -408,7 +418,7 @@ end
downButton:Show()
bottomButton = _G[name .. "ButtonFrameBottomButton"]
bottomButton:SetScript("OnShow", nil)
bottomButton:Show()
bottomButton:SetShown(self.showButtons)
bottomButton:SetParent(_G[name .. "ButtonFrame"])
end

Expand Down Expand Up @@ -493,6 +503,7 @@ end
button.override = true
button:Show()
end
self:MarkButtonFramesDirty()
end

function module:ScrollDown(frame)
Expand All @@ -502,13 +513,15 @@ end
button:Hide()
end
end
self:MarkButtonFramesDirty()
end

function module:ScrollDownForce(frame)
local button = _G[frame:GetName() .. "ButtonFrameBottomButton"]
if button then
button:Hide()
end
self:MarkButtonFramesDirty()
end

--function module:AddMessage(frame, text, ...)
Expand All @@ -522,6 +535,7 @@ end
else
button:Hide()
end
self:MarkButtonFramesDirty()
end


Expand Down

0 comments on commit 548ee44

Please sign in to comment.