public AddControlSchemePopup(InputActionAssetManager assetManager, InputActionWindowToolbar toolbar, Action apply) { m_AssetManager = assetManager; m_Toolbar = toolbar; m_SetFocus = true; m_Apply = apply; }
// 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(); }
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(); }
// 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(); }
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; }
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; }
public void SetReferences(AssetInspectorWindow window, InputActionAssetManager assetManager, InputActionWindowToolbar toolbar) { m_AssetInspectorWindow = window; m_ActionAssetManager = assetManager; m_Toolbar = toolbar; }
public ActionInspectorContextMenu(AssetInspectorWindow window, InputActionAssetManager assetManager, InputActionWindowToolbar toolbar) { SetReferences(window, assetManager, toolbar); }
public override InputBindingPropertiesView GetPropertiesView(Action apply, TreeViewState state, InputActionWindowToolbar toolbar) { return(new CompositeGroupPropertiesView(elementProperty, apply, state, toolbar)); }
public virtual InputBindingPropertiesView GetPropertiesView(Action apply, TreeViewState state, InputActionWindowToolbar toolbar) { return(new InputBindingPropertiesView(elementProperty, apply, state, toolbar)); }
public CompositeGroupPropertiesView(SerializedProperty property, Action apply, TreeViewState state, InputActionWindowToolbar toolbar) : base(property, apply, state, toolbar) { }