Exemple #1
0
        private void OnItemDoubleClicked(ActionTreeItemBase item)
        {
            // Double-clicking on binding or action item opens property popup.
            PropertiesViewBase propertyView = null;

            if (item is BindingTreeItem)
            {
                if (m_ControlPickerState == null)
                {
                    m_ControlPickerState = new InputControlPickerState();
                }
                propertyView = new InputBindingPropertiesView(item.property,
                                                              controlPickerState: m_ControlPickerState,
                                                              expectedControlLayout: item.expectedControlLayout,
                                                              onChange:
                                                              change => m_TreeView.Reload());
            }
            else if (item is ActionTreeItem)
            {
                propertyView = new InputActionPropertiesView(item.property,
                                                             onChange: change => m_TreeView.Reload());
            }

            if (propertyView != null)
            {
                var rect = new Rect(GUIUtility.GUIToScreenPoint(Event.current.mousePosition), Vector2.zero);
                PropertiesViewPopup.Show(rect, propertyView);
            }
        }
 public abstract bool AcceptsDrop(ActionTreeItemBase item);
 public override bool AcceptsDrop(ActionTreeItemBase item)
 {
     return(item is PartOfCompositeBindingTreeItem);
 }
 public override bool AcceptsDrop(ActionTreeItemBase item)
 {
     return(false);
 }