コード例 #1
0
 public void Init(Rect position, EditorWindow owner, UnityAction <ObjectTreeForSelector.TreeSelectorData> treeViewNeededCallback, UnityAction <TreeViewItem> selectionCallback, UnityAction doubleClickedCallback, int initialSelectedTreeViewItemID, int userData)
 {
     this.Clear();
     this.m_Owner = owner;
     this.m_TreeViewNeededEvent = new ObjectTreeForSelector.TreeViewNeededEvent();
     this.m_TreeViewNeededEvent.AddPersistentListener(treeViewNeededCallback, UnityEventCallState.EditorAndRuntime);
     this.m_SelectionEvent = new ObjectTreeForSelector.SelectionEvent();
     this.m_SelectionEvent.AddPersistentListener(selectionCallback, UnityEventCallState.EditorAndRuntime);
     this.m_DoubleClickedEvent = new ObjectTreeForSelector.DoubleClickedEvent();
     this.m_DoubleClickedEvent.AddPersistentListener(doubleClickedCallback, UnityEventCallState.EditorAndRuntime);
     this.m_OriginalSelectedID = initialSelectedTreeViewItemID;
     this.m_UserData           = userData;
     this.m_FocusSearchFilter  = true;
     this.EnsureTreeViewIsValid(this.GetTreeViewRect(position));
     if (this.m_TreeView != null)
     {
         this.m_TreeView.SetSelection(new int[]
         {
             this.m_OriginalSelectedID
         }, true);
         if (this.m_OriginalSelectedID == 0)
         {
             this.m_TreeView.data.SetExpandedWithChildren(this.m_TreeView.data.root, true);
         }
     }
 }
コード例 #2
0
 public void Clear()
 {
     this.m_Owner = null;
     this.m_TreeViewNeededEvent = null;
     this.m_SelectionEvent      = null;
     this.m_DoubleClickedEvent  = null;
     this.m_OriginalSelectedID  = 0;
     this.m_UserData            = 0;
     this.m_TreeView            = null;
     this.m_TreeViewState       = null;
     this.m_ErrorCounter        = 0;
     this.m_FocusSearchFilter   = false;
 }
コード例 #3
0
 public void Clear()
 {
     this.m_Owner = (EditorWindow)null;
     this.m_TreeViewNeededEvent = (ObjectTreeForSelector.TreeViewNeededEvent)null;
     this.m_SelectionEvent      = (ObjectTreeForSelector.SelectionEvent)null;
     this.m_DoubleClickedEvent  = (ObjectTreeForSelector.DoubleClickedEvent)null;
     this.m_OriginalSelectedID  = 0;
     this.m_UserData            = 0;
     this.m_TreeView            = (TreeView)null;
     this.m_TreeViewState       = (TreeViewState)null;
     this.m_ErrorCounter        = 0;
     this.m_FocusSearchFilter   = false;
 }