Skip to content

Commit

Permalink
Fixed treeview demo bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoguzhu committed Nov 11, 2019
1 parent e6ab42c commit 7e72782
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions Assets/Examples/TreeView/TreeViewMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ public class TreeViewMain : MonoBehaviour
GComponent _mainView;
GTree _tree1;
GTree _tree2;
string _folderURL1;
string _folderURL2;
string _fileURL;

void Awake()
Expand All @@ -20,8 +18,6 @@ void Start()
{
_mainView = this.GetComponent<UIPanel>().ui;

_folderURL1 = "ui://TreeView/folder_closed";
_folderURL2 = "ui://TreeView/folder_opened";
_fileURL = "ui://TreeView/file";

_tree1 = _mainView.GetChild("tree").asTree;
Expand Down Expand Up @@ -66,10 +62,6 @@ void RenderTreeNode(GTreeNode node, GComponent obj)
{
if (node.isFolder)
{
if (node.expanded)
obj.icon = _folderURL2;
else
obj.icon = _folderURL1;
obj.text = (string)node.data;
}
else if (node.data is string[])
Expand Down

0 comments on commit 7e72782

Please sign in to comment.