Skip to content

Commit

Permalink
Fix not being able to drag some chat frames to the very edge since BfA.
Browse files Browse the repository at this point in the history
  • Loading branch information
funkydude committed Jul 27, 2018
1 parent 44fbbc5 commit 46770f3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions BasicCore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ local AddMessage = function(frame, text, ...)
end
return oldAddMsg[frame:GetName()](frame, text, ...)
end
local function ReApplyClamp(self)
BCM.Events.SetClampRectInsets(self, 0,0,0,0)
end

BCM.Events.ADDON_LOADED = function(frame, addon)
if addon == addonName then
Expand Down Expand Up @@ -143,6 +146,8 @@ BCM.Events.PLAYER_LOGIN = function(frame)

--Allow the chat frame to move to the end of the screen
cF:SetClampRectInsets(0,0,0,0)
--Need to re-apply it if the base UI changes it
hooksecurefunc(cF, "SetClampRectInsets", ReApplyClamp)

--Allow arrow keys editing in the edit box
local eB = _G[n.."EditBox"]
Expand Down Expand Up @@ -174,6 +179,8 @@ for i=1, BCM.chatFrames do
local cF = _G[("%s%d"):format("ChatFrame", i)]
--Allow the chat frame to move to the end of the screen
cF:SetClampRectInsets(0,0,0,0)
--Need to re-apply it if the base UI changes it
hooksecurefunc(cF, "SetClampRectInsets", ReApplyClamp)
end
--Clamp the toast frame to screen to prevent it cutting out
BNToastFrame:SetClampedToScreen(true)
Expand Down

0 comments on commit 46770f3

Please sign in to comment.