示例#1
0
        private void OnItemDoubleClicked(ActionTreeItemBase item, SerializedProperty property)
        {
            var viewData = GetOrCreateViewData(property);

            // Double-clicking on binding or action item opens property popup.
            PropertiesViewBase propertyView = null;

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

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