public GameObject CreateTreeView(GameObject Parent, out CTUITreeView TreeView) { GameObject gob = CreateElement(Parent, "treeView"); AddVerticalLayout(gob); gob.GetComponent <VerticalLayoutGroup>().padding = new RectOffset(2, 2, 2, 2); TreeView = new CTUITreeView(this, gob); return(gob); }
public CTUITreeViewItem(CTUITreeView TreeView, CTUITreeViewItem Parent, Action OnClicked = null, Action OnDoubleClicked = null) { _treeview = TreeView; mParent = Parent; _onClickedAction = OnClicked; _onDoubleClickedAction = OnDoubleClicked; if (mParent != null) { mIndentLevel = mParent.mIndentLevel + 1; } else { mIndentLevel = 0; } }