private void SetControl(InputDevice device) { if (actions == null) { actions = UIActions.CreateWithJoystickBindings(); } actions.Device = device; }
public static UIActions CreateWithJoystickBindings() { var actions = new UIActions(); actions.CycleLeft.AddDefaultBinding(InputControlType.LeftBumper); actions.CycleRight.AddDefaultBinding(InputControlType.RightBumper); actions.Select.AddDefaultBinding(InputControlType.Action3); actions.Back.AddDefaultBinding(InputControlType.Action2); actions.Details.AddDefaultBinding(InputControlType.Action4); actions.Edit.AddDefaultBinding(InputControlType.Action1); actions.ExitState.AddDefaultBinding(InputControlType.Back); return(actions); }