private void RepositionHierarchy(NguiItemsSourceBinding node) { var childSources = node.GetComponentsInChildren<NguiItemsSourceBinding>(true); foreach (var c in childSources) { if (c != node && c._dirty) { RepositionHierarchy(c); } } node.RepositionContent(); }
private void RepositionHierarchy(NguiItemsSourceBinding node) { var childSources = node.GetComponentsInChildren <NguiItemsSourceBinding>(true); foreach (var c in childSources) { if (c != node && c._dirty) { RepositionHierarchy(c); } } node.RepositionContent(); }
public void addChildView() { mainViewContainer.GetComponent <MainViewContainerController>().OnAddSubView(); int childLevel = mainViewContainer.GetComponent <MainViewContainerController>().MenuLevelCount; GameObject view = (GameObject)Instantiate(Resources.Load("SayduckNdata/ChildListView")); view.name = "Child_" + childLevel.ToString(); view.transform.parent = mainViewContainer.transform; view.transform.localScale = new Vector3(1, 1, 1); view.transform.localPosition = new Vector3(Screen.width * childLevel, view.transform.localPosition.y, view.transform.localPosition.z); string itemSourceBindingString = "RootUIMenuItem"; for (int i = 0; i < childLevel; i++) { itemSourceBindingString += ".SelectedItem.SubMenuItems"; } NguiItemsSourceBinding itemsSourceBinding = GameObject.Find("Child_" + childLevel.ToString() + "/PanelsParent/3.ListViewPanel/DraggablePanel/UIGrid").GetComponent <NguiItemsSourceBinding>(); itemsSourceBinding.Path = itemSourceBindingString; }
public override void Start () { base.Start (); _parent = NguiUtils.GetComponentInParentsExcluding<NguiItemsSourceBinding>(gameObject); }
public override void Start() { base.Start(); _parent = NguiUtils.GetComponentInParentsExcluding <NguiItemsSourceBinding>(gameObject); }