private static void CreateForCharacter()
 {
     MyControllerHelper.AddContext(CX_CHARACTER, CX_BASE);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.FORWARD, MyJoystickAxesEnum.Yneg);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.BACKWARD, MyJoystickAxesEnum.Ypos);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.STRAFE_LEFT, MyJoystickAxesEnum.Xneg);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.STRAFE_RIGHT, MyJoystickAxesEnum.Xpos);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.PRIMARY_TOOL_ACTION, MyJoystickAxesEnum.Zneg);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.SECONDARY_TOOL_ACTION, MyJoystickAxesEnum.Zpos);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.PRIMARY_BUILD_ACTION, MyJoystickAxesEnum.Zneg);   // MW:TODO shouldn't be this way I think
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.SECONDARY_BUILD_ACTION, MyJoystickAxesEnum.Zpos); // this too
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.COPY_PASTE_ACTION, MyJoystickAxesEnum.Zneg);      // this too
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.ROTATION_LEFT, MyJoystickAxesEnum.RotationXneg);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.ROTATION_RIGHT, MyJoystickAxesEnum.RotationXpos);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.ROTATION_UP, MyJoystickAxesEnum.RotationYneg);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.ROTATION_DOWN, MyJoystickAxesEnum.RotationYpos);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.JUMP, MyJoystickButtonsEnum.J01);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.SLOT0, MyJoystickButtonsEnum.J02);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.USE, MyJoystickButtonsEnum.J03);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.THRUSTS, MyJoystickButtonsEnum.J04);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.ROLL_LEFT, MyJoystickButtonsEnum.J05);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.ROLL_RIGHT, MyJoystickButtonsEnum.J06);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.CROUCH, MyJoystickButtonsEnum.J09);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.BUILD_MODE, MyJoystickButtonsEnum.J10);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.TOOLBAR_UP, MyJoystickButtonsEnum.JDUp);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.TOOLBAR_DOWN, MyJoystickButtonsEnum.JDDown);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.TOOLBAR_NEXT_ITEM, MyJoystickButtonsEnum.JDRight);
     MyControllerHelper.AddControl(CX_CHARACTER, MyControlsSpace.TOOLBAR_PREV_ITEM, MyJoystickButtonsEnum.JDLeft);
 }
Exemple #2
0
 private static void CreateForSpaceship()
 {
     MyControllerHelper.AddContext(CX_SPACESHIP, CX_CHARACTER);
     MyControllerHelper.AddControl(CX_SPACESHIP, MyControlsSpace.TOGGLE_REACTORS, MyJoystickButtonsEnum.J04);
     MyControllerHelper.NullControl(CX_SPACESHIP, MyControlsSpace.PRIMARY_BUILD_ACTION);
     MyControllerHelper.NullControl(CX_SPACESHIP, MyControlsSpace.SECONDARY_BUILD_ACTION);
 }
Exemple #3
0
        private static void CreateForBase()
        {
            MyStringId?parent = null;

            MyControllerHelper.AddContext(CX_BASE, parent);
            MyControllerHelper.AddControl(CX_BASE, MyControlsSpace.CONTROL_MENU, MyJoystickButtonsEnum.J07);
            MyControllerHelper.AddControl(CX_BASE, MyControlsGUI.MAIN_MENU, MyJoystickButtonsEnum.J08);
        }
 private static void CreateForGUI()
 {
     MyControllerHelper.AddContext(CX_GUI, CX_BASE);
     MyControllerHelper.AddControl(CX_GUI, MyControlsGUI.ACCEPT, MyJoystickButtonsEnum.J01);
     MyControllerHelper.AddControl(CX_GUI, MyControlsGUI.CANCEL, MyJoystickButtonsEnum.J02);
     MyControllerHelper.AddControl(CX_GUI, MyControlsGUI.MOVE_UP, MyJoystickButtonsEnum.JDUp);
     MyControllerHelper.AddControl(CX_GUI, MyControlsGUI.MOVE_DOWN, MyJoystickButtonsEnum.JDDown);
     MyControllerHelper.AddControl(CX_GUI, MyControlsGUI.MOVE_LEFT, MyJoystickButtonsEnum.JDLeft);
     MyControllerHelper.AddControl(CX_GUI, MyControlsGUI.MOVE_RIGHT, MyJoystickButtonsEnum.JDRight);
 }
 private static void CreateForBuildMode()
 {
     MyControllerHelper.AddContext(CX_BUILD_MODE, CX_CHARACTER);
     MyControllerHelper.AddControl(CX_BUILD_MODE, MyControlsSpace.CUBE_COLOR_CHANGE, MyJoystickButtonsEnum.J01);
     MyControllerHelper.AddControl(CX_BUILD_MODE, MyControlsSpace.USE_SYMMETRY, MyJoystickButtonsEnum.J03);
     MyControllerHelper.AddControl(CX_BUILD_MODE, MyControlsSpace.SYMMETRY_SWITCH, MyJoystickButtonsEnum.J04);
     MyControllerHelper.AddControl(CX_BUILD_MODE, MyControlsSpace.CUBE_ROTATE_ROLL_POSITIVE, MyJoystickButtonsEnum.J05);
     MyControllerHelper.AddControl(CX_BUILD_MODE, MyControlsSpace.CUBE_ROTATE_ROLL_NEGATIVE, MyJoystickButtonsEnum.J06);
     MyControllerHelper.AddControl(CX_BUILD_MODE, MyControlsSpace.CUBE_ROTATE_VERTICAL_POSITIVE, MyJoystickAxesEnum.Xneg);
     MyControllerHelper.AddControl(CX_BUILD_MODE, MyControlsSpace.CUBE_ROTATE_VERTICAL_NEGATIVE, MyJoystickAxesEnum.Xpos);
     MyControllerHelper.AddControl(CX_BUILD_MODE, MyControlsSpace.CUBE_ROTATE_HORISONTAL_POSITIVE, MyJoystickAxesEnum.Yneg);
     MyControllerHelper.AddControl(CX_BUILD_MODE, MyControlsSpace.CUBE_ROTATE_HORISONTAL_NEGATIVE, MyJoystickAxesEnum.Ypos);
 }
 private static void CreateForVoxelHands()
 {
     MyControllerHelper.AddContext(CX_VOXEL, CX_CHARACTER);
     MyControllerHelper.AddControl(CX_VOXEL, MyControlsSpace.VOXEL_PAINT, MyJoystickButtonsEnum.J01);
     MyControllerHelper.AddControl(CX_VOXEL, MyControlsSpace.SWITCH_LEFT, MyJoystickButtonsEnum.J03);
     MyControllerHelper.AddControl(CX_VOXEL, MyControlsSpace.VOXEL_HAND_SETTINGS, MyJoystickButtonsEnum.J04);
     MyControllerHelper.AddControl(CX_VOXEL, MyControlsSpace.CUBE_ROTATE_ROLL_POSITIVE, MyJoystickButtonsEnum.J05);
     MyControllerHelper.AddControl(CX_VOXEL, MyControlsSpace.CUBE_ROTATE_ROLL_NEGATIVE, MyJoystickButtonsEnum.J06);
     MyControllerHelper.NullControl(CX_VOXEL, MyControlsSpace.CROUCH);
     MyControllerHelper.NullControl(CX_VOXEL, MyControlsSpace.PRIMARY_BUILD_ACTION);
     MyControllerHelper.NullControl(CX_VOXEL, MyControlsSpace.SECONDARY_BUILD_ACTION);
     MyControllerHelper.AddControl(CX_VOXEL, MyControlsSpace.CUBE_ROTATE_VERTICAL_POSITIVE, MyJoystickAxesEnum.Xneg);
     MyControllerHelper.AddControl(CX_VOXEL, MyControlsSpace.CUBE_ROTATE_VERTICAL_NEGATIVE, MyJoystickAxesEnum.Xpos);
     MyControllerHelper.AddControl(CX_VOXEL, MyControlsSpace.CUBE_ROTATE_HORISONTAL_POSITIVE, MyJoystickAxesEnum.Yneg);
     MyControllerHelper.AddControl(CX_VOXEL, MyControlsSpace.CUBE_ROTATE_HORISONTAL_NEGATIVE, MyJoystickAxesEnum.Ypos);
 }