You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
596 B
30 lines
596 B
using UnityEngine; |
|
using UnityEngine.UI; |
|
using UIWidgets; |
|
using System.Collections.Generic; |
|
using System.Linq; |
|
|
|
namespace UIWidgetsSamples { |
|
public class DialogTreeViewInputHelper : MonoBehaviour { |
|
[SerializeField] |
|
public TreeView Folders; |
|
|
|
ObservableList<TreeNode<TreeViewItem>> nodes; |
|
bool _InitDone; |
|
|
|
public void Refresh() |
|
{ |
|
if (!_InitDone) |
|
{ |
|
var config = new List<int>() { 5, 5, 2 }; |
|
nodes = TestTreeView.GenerateTreeNodes(config, isExpanded: true); |
|
|
|
// Set nodes |
|
Folders.Start(); |
|
Folders.Nodes = nodes; |
|
|
|
_InitDone = true; |
|
} |
|
} |
|
} |
|
} |