-
-
Save anonymous/6b4658b67ea40191164b5f3d32ee9b1b to your computer and use it in GitHub Desktop.
chat bubbles clamping to top
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function module:IterateChatBubbles(funcToCall) | |
for i = 1, WorldFrame:GetNumChildren() do | |
local v = select(i, WorldFrame:GetChildren()) | |
local b = v.isChatBubble == nil and v:GetBackdrop() | |
if v.isChatBubble ~= false and b and b.bgFile == "Interface\\Tooltips\\ChatBubble-Background" then | |
v.isChatBubble = true | |
v:SetClampRectInsets(-1, -1, -1, -1) | |
for i = 1, v:GetNumRegions() do | |
local frame = v | |
local v = select(i, v:GetRegions()) | |
if v:GetObjectType() == "FontString" then | |
local fontstring = v | |
if type(funcToCall) == "function" then | |
funcToCall(frame, fontstring) | |
else | |
self[funcToCall](self, frame, fontstring) | |
end | |
end | |
end | |
else | |
v.isChatBubble = false | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment