Hello, I normally use the following code to define a bubble object:
Lua Code:
function BB_findChatBubble(msg)
for _, bubble in pairs(C_ChatBubbles.GetAllChatBubbles()) do
-- Iterate the children, as the actual bubble content
for i = 1, bubble:GetNumChildren() do
local child = select(i, select(i, bubble:GetChildren()))
if ((child:GetObjectType() == "Frame") and (child.String) and (child.Center)) then
-- This is hopefully the frame with the content
for i = 1, child:GetNumRegions() do
local region = select(i, child:GetRegions());
if region and not region:GetName() and region:IsVisible() and region.GetText and (region:GetText() == msg) then
return region; -- this is serching object
end
end
end
end
end
end
But this code doesn't work in dungeons. Bubbles in dungeons do not spawn from variable
C_ChatBubbles.GetAllChatBubbles().
Is there another way to determine the currently displayed bubble in a dungeon?