Skip to content

Instantly share code, notes, and snippets.

/PratBubbles.lua Secret

Created August 25, 2016 07:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/3b09664b4203a024f55865fdbd1085a0 to your computer and use it in GitHub Desktop.
Save anonymous/3b09664b4203a024f55865fdbd1085a0 to your computer and use it in GitHub Desktop.
chat bubbles clamping to top, :IsClampedToScreen() returns false
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
print("A", v, v:GetDebugName(), v:IsClampedToScreen())
for i = 1, v:GetNumRegions() do
local frame = v
local v = select(i, v:GetRegions())
if v.IsClampedToScreen then
print("B", v, v:GetDebugName(), v:IsClampedToScreen())
end
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