Exemplo n.º 1
0
        void OnAddAction()
        {
            var actionLine = GetSelectedActionMapLine();

            InputActionSerializationHelpers.AddAction(actionLine.elementProperty);
            Apply();
        }
        protected void AddAction(object propertyObj)
        {
            var property = (SerializedProperty)propertyObj;

            InputActionSerializationHelpers.AddAction(property);
            property.serializedObject.ApplyModifiedProperties();
            m_TreeView.Reload();
        }
Exemplo n.º 3
0
        protected override void DoubleClickedItem(int id)
        {
            var item = FindItem(id, rootItem);

            if (item == null)
            {
                return;
            }

            var addNewAction = item as AddNewActionItem;

            if (addNewAction != null)
            {
                ////FIXME: for some reason, the item initially appears *before* other actions in the list and then later moves
                var actionSetItem = (ActionSetItem)addNewAction.parent;
                InputActionSerializationHelpers.AddAction(actionSetItem.property);
                m_ApplyAction();
                ////TODO: initiate rename right away
                Reload();
                return;
            }

            BeginRename(item);
        }
Exemplo n.º 4
0
 public void AddAction()
 {
     InputActionSerializationHelpers.AddAction(elementProperty);
 }