修复bug
This commit is contained in:
parent
c1e138c2c4
commit
7003fc038c
@ -421,7 +421,6 @@ namespace QFramework.Example
|
||||
bodyItem.transform.Find("Content/Btns").gameObject.SetActive(false);
|
||||
bodyItem.transform.Find("Content/Label").GetComponent<TextMeshProUGUI>().text = body.Name;
|
||||
var bodyToggle = bodyItem.GetComponent<Toggle>();
|
||||
bodyToggle.isOn = body.isShow;
|
||||
GameObject obj = Utility.FindObj(body.Path);
|
||||
obj.SetActive(body.isShow);
|
||||
bodyToggle.onValueChanged.AddListener(isOn =>
|
||||
@ -429,6 +428,7 @@ namespace QFramework.Example
|
||||
SetAllChildren<Transform>(obj.transform, isOn);
|
||||
obj.SetActive(isOn);
|
||||
});
|
||||
bodyToggle.isOn = body.isShow;
|
||||
var iconImg = bodyItem.transform.Find("Icon").GetComponent<Image>();
|
||||
LoadIcon(body.Icon, body, iconImg);
|
||||
}
|
||||
|
||||
@ -348,6 +348,7 @@ namespace QFramework.Example
|
||||
for (int i = 0; i < parent.childCount; i++)
|
||||
{
|
||||
Transform child = parent.GetChild(i);
|
||||
Transform subContent = child.Find("SubContent");
|
||||
Transform labelTransform = child.Find("Content/Toggle/Content/Label");
|
||||
if (labelTransform != null)
|
||||
{
|
||||
@ -359,7 +360,6 @@ namespace QFramework.Example
|
||||
{
|
||||
GameObject clone = GameObject.Instantiate(SearchItem.gameObject, SearchContent);
|
||||
searchItemMap.Add(clone, child.gameObject);
|
||||
Transform subContent = child.Find("SubContent");
|
||||
Button btn = clone.transform.Find("Button").GetComponent<Button>();
|
||||
btn.onClick.AddListener(() =>
|
||||
{
|
||||
@ -383,6 +383,13 @@ namespace QFramework.Example
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (subContent.childCount > 0)
|
||||
{
|
||||
CheckChildren(subContent, str);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user