Wanzyee Studio

Show specified root TreeNode with children for selecting multiple custom items. More...

Inherits EditorWindow.

Static Public Member Functions

static void Open (TreeNode root, Action< TreeNode > onDone=null, Action< TreeNode > onCancel=null)
 Open a new TreeView to show specified root TreeNode. More...
 

Detailed Description

Show specified root TreeNode with children for selecting multiple custom items.

Click any node label to toggle expand to show its children if existing, otherwise toggle enable. Press "Alt" and click to recursively expand or fold all progenies. Or to batch enable or disable all the same name nodes in the same level.

To complete selecting, please press the "OK" button or the "Enter" key. To cancel, just close the window, e.g., press the top-right "X" button or the "Esc" key or click outside. The callbacks passed to Open() will be invoked when complete or cancel selecting.

3

Member Function Documentation

static void Open ( TreeNode  root,
Action< TreeNode onDone = null,
Action< TreeNode onCancel = null 
)
static

Open a new TreeView to show specified root TreeNode.

Opening new TreeView will close existing one and invokes its onCancel callback. This sets the child nodes enabled if the parent is, or disable a parent if any child is not. Also set the parent expand if any child expands.

Parameters
rootRoot node.
onDoneInvoked with the given root when complete selecting.
onCancelInvoked with the given root when cancel selecting.