コード例 #1
0
 public AddControlSchemePopup(InputActionAssetManager assetManager, InputActionWindowToolbar toolbar, Action apply)
 {
     m_AssetManager = assetManager;
     m_Toolbar      = toolbar;
     m_SetFocus     = true;
     m_Apply        = apply;
 }
コード例 #2
0
        // Set asset would usually only be called when the window is open
        private void SetAsset(InputActionAsset referencedObject)
        {
            m_ActionAssetManager = new InputActionAssetManager(referencedObject);
            m_ActionAssetManager.SetReferences(SetTitle);
            m_ActionAssetManager.InitializeObjectReferences();
            m_InputActionWindowToolbar = new InputActionWindowToolbar(m_ActionAssetManager, Apply);
            m_ContextMenu = new ActionInspectorContextMenu(this, m_ActionAssetManager);
            InitializeTrees();

            // Make sure first actions map selected and actions tree expanded
            m_ActionMapsTree.SelectFirstRow();
            OnActionMapSelection();
            m_ActionsTree.ExpandAll();
            LoadPropertiesForSelection();
        }
コード例 #3
0
 public InputBindingPropertiesView(SerializedProperty bindingProperty, Action reloadTree, TreeViewState controlPickerTreeViewState, InputActionWindowToolbar toolbar)
 {
     m_ControlPickerTreeViewState = controlPickerTreeViewState;
     m_BindingProperty            = bindingProperty;
     m_ReloadTree           = reloadTree;
     m_InteractionsProperty = bindingProperty.FindPropertyRelative("m_Interactions");
     m_ProcessorsProperty   = bindingProperty.FindPropertyRelative("m_Processors");
     m_GroupsProperty       = bindingProperty.FindPropertyRelative("m_Groups");
     m_InteractionsReorderableReorderableList   = new InteractionsReorderableReorderableList(m_InteractionsProperty, ApplyModifiers);
     m_ProcessorsReorderableReorderableListView = new ProcessorsReorderableReorderableList(m_ProcessorsProperty, ApplyModifiers);
     m_Toolbar = toolbar;
     if (m_Toolbar != null)
     {
         m_ControlSchemes = toolbar.controlSchemes;
     }
     m_BingingGroups = m_GroupsProperty.stringValue.Split(InputBinding.kSeparator).ToList();
 }
コード例 #4
0
        // Set asset would usually only be called when the window is open
        private void SetAsset(InputActionAsset asset)
        {
            m_ActionAssetManager = new InputActionAssetManager(asset)
            {
                onDirtyChanged = OnDirtyChanged
            };
            m_ActionAssetManager.InitializeObjectReferences();
            m_InputActionWindowToolbar = new InputActionWindowToolbar(m_ActionAssetManager, ApplyAndReload);
            m_ContextMenu = new ActionInspectorContextMenu(this, m_ActionAssetManager, m_InputActionWindowToolbar);
            InitializeTrees();

            // Make sure first actions map selected and actions tree expanded
            m_ActionMapsTree.SelectFirstRow();
            OnActionMapSelection();
            m_ActionsTree.ExpandAll();
            LoadPropertiesForSelection();

            UpdateWindowTitle();
        }
コード例 #5
0
 public InputBindingPropertiesView(SerializedProperty bindingProperty, Action <FourCC> onChange,
                                   InputControlPickerState controlPickerState, InputActionWindowToolbar toolbar,
                                   bool isCompositeBinding      = false,
                                   string expectedControlLayout = null)
     : base(isCompositeBinding ? "Composite" : "Binding", bindingProperty, onChange, expectedControlLayout)
 {
     m_ControlPickerState = controlPickerState;
     m_BindingProperty    = bindingProperty;
     m_GroupsProperty     = bindingProperty.FindPropertyRelative("m_Groups");
     m_PathProperty       = bindingProperty.FindPropertyRelative("m_Path");
     m_Toolbar            = toolbar;
     if (m_Toolbar != null)
     {
         m_ControlSchemes = toolbar.controlSchemes;
     }
     m_BindingGroups         = m_GroupsProperty.stringValue.Split(InputBinding.kSeparator).ToList();
     m_ExpectedControlLayout = expectedControlLayout;
     m_IsComposite           = isCompositeBinding;
 }
コード例 #6
0
 public InputBindingPropertiesView(SerializedProperty bindingProperty, Action <Change> onChange,
                                   InputControlPickerState controlPickerState, InputActionWindowToolbar toolbar,
                                   string expectedControlLayout = null)
 {
     m_ControlPickerState   = controlPickerState;
     m_BindingProperty      = bindingProperty;
     m_OnChange             = onChange;
     m_InteractionsProperty = bindingProperty.FindPropertyRelative("m_Interactions");
     m_ProcessorsProperty   = bindingProperty.FindPropertyRelative("m_Processors");
     m_GroupsProperty       = bindingProperty.FindPropertyRelative("m_Groups");
     m_PathProperty         = bindingProperty.FindPropertyRelative("m_Path");
     m_InteractionsList     = new InteractionsReorderableReorderableList(m_InteractionsProperty, OnInteractionsModified);
     m_ProcessorsList       = new ProcessorsReorderableReorderableList(m_ProcessorsProperty, OnProcessorsModified);
     m_Toolbar = toolbar;
     if (m_Toolbar != null)
     {
         m_ControlSchemes = toolbar.controlSchemes;
     }
     m_BindingGroups         = m_GroupsProperty.stringValue.Split(InputBinding.kSeparator).ToList();
     m_ExpectedControlLayout = expectedControlLayout;
 }
コード例 #7
0
 public void SetReferences(AssetInspectorWindow window, InputActionAssetManager assetManager, InputActionWindowToolbar toolbar)
 {
     m_AssetInspectorWindow = window;
     m_ActionAssetManager   = assetManager;
     m_Toolbar = toolbar;
 }
コード例 #8
0
 public ActionInspectorContextMenu(AssetInspectorWindow window, InputActionAssetManager assetManager, InputActionWindowToolbar toolbar)
 {
     SetReferences(window, assetManager, toolbar);
 }
コード例 #9
0
 public override InputBindingPropertiesView GetPropertiesView(Action apply, TreeViewState state, InputActionWindowToolbar toolbar)
 {
     return(new CompositeGroupPropertiesView(elementProperty, apply, state, toolbar));
 }
コード例 #10
0
 public virtual InputBindingPropertiesView GetPropertiesView(Action apply, TreeViewState state, InputActionWindowToolbar toolbar)
 {
     return(new InputBindingPropertiesView(elementProperty, apply, state, toolbar));
 }
コード例 #11
0
 public CompositeGroupPropertiesView(SerializedProperty property, Action apply, TreeViewState state, InputActionWindowToolbar toolbar)
     : base(property, apply, state, toolbar)
 {
 }