local function CheckForTextInFontStrings(parent)
-- 遍历父窗口下的所有子窗口
for i = 1, parent:GetNumChildren() do
-- 使用select()函数来安全地获取子窗口
local child = select(i, parent:GetChildren())
-- 检查child是否为nil
if child ~= nil then
-- 检查子窗口是否是FontString类型
if child:GetObjectType() == "FontString" then
-- 获取FontString的文本
local text = child:GetText()
-- 检查文本是否包含“请点击”
if text and text:find("请点击") then
local childName = child:GetName() or "未命名"
print("FontString '"..childName.."' 包含文本 ‘请点击’")
end
else
-- 如果子窗口不是FontString,可能是另一个容器,递归检查
CheckForTextInFontStrings(child)
end
end
end
end