33 lines
594 B
C#
33 lines
594 B
C#
using System.Collections.Generic;
|
|
using UIWidgets;
|
|
using UnityEngine;
|
|
|
|
namespace UIWidgetsSamples
|
|
{
|
|
public class DialogTreeViewInputHelper : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
public TreeView Folders;
|
|
|
|
private ObservableList<TreeNode<TreeViewItem>> nodes;
|
|
|
|
private bool _InitDone;
|
|
|
|
public void Refresh()
|
|
{
|
|
if (!_InitDone)
|
|
{
|
|
List<int> list = new List<int>();
|
|
list.Add(5);
|
|
list.Add(5);
|
|
list.Add(2);
|
|
List<int> items = list;
|
|
nodes = TestTreeView.GenerateTreeNodes(items);
|
|
Folders.Start();
|
|
Folders.Nodes = nodes;
|
|
_InitDone = true;
|
|
}
|
|
}
|
|
}
|
|
}
|