Class GamepadMappings
java.lang.Object
gaiasky.gui.main.AbstractGamepadMappings
gaiasky.gui.main.GamepadMappings
- All Implemented Interfaces:
IGamepadMappings
Contains mappings from actions to input targets for gamepads. The information is typically
loaded from
gamepad_name.controller files.-
Field Summary
Fields inherited from class AbstractGamepadMappings
AXIS_DPAD_H, AXIS_DPAD_V, AXIS_LB, AXIS_LSTICK_H, AXIS_LSTICK_H_SENS, AXIS_LSTICK_V, AXIS_LSTICK_V_SENS, AXIS_LT, AXIS_LT_SENS, AXIS_RB, AXIS_RSTICK_H, AXIS_RSTICK_H_SENS, AXIS_RSTICK_V, AXIS_RSTICK_V_SENS, AXIS_RT, AXIS_RT_SENS, AXIS_VALUE_POW, BUTTON_A, BUTTON_B, BUTTON_DPAD_DOWN, BUTTON_DPAD_LEFT, BUTTON_DPAD_RIGHT, BUTTON_DPAD_UP, BUTTON_LB, BUTTON_LSTICK, BUTTON_LT, BUTTON_RB, BUTTON_RSTICK, BUTTON_RT, BUTTON_SELECT, BUTTON_START, BUTTON_X, BUTTON_Y, logger, ZERO_POINTModifier and TypeFieldDescriptionintintintintLeft stick horizontal code.doubleintLeft stick vertical code.doubleintdoubleintintRight stick horizontal code.doubleintRight stick vertical code.doubleintdoubledoubleintintintintintintintintintintintintintintintintprotected static final Logger.Logdouble -
Constructor Summary
ConstructorsConstructorDescriptionGamepadMappings(String controllerName) Create empty controller mappings.GamepadMappings(String controllerName, Path mappingsFile) Create a controller mappings instance from a *.controller file -
Method Summary
Methods inherited from class AbstractGamepadMappings
getAxisDpadH, getAxisDpadV, getAxisLB, getAxisLstickH, getAxisLstickHSensitivity, getAxisLstickV, getAxisLstickVSensitivity, getAxisLT, getAxisLTSensitivity, getAxisRB, getAxisRstickH, getAxisRstickHSensitivity, getAxisRstickV, getAxisRstickVSensitivity, getAxisRT, getAxisRTSensitivity, getAxisValuePower, getButtonA, getButtonB, getButtonDpadDown, getButtonDpadLeft, getButtonDpadRight, getButtonDpadUp, getButtonLB, getButtonLstick, getButtonLT, getButtonRB, getButtonRstick, getButtonRT, getButtonSelect, getButtonStart, getButtonX, getButtonY, getZeroPoint, readGamepadMappingsModifier and TypeMethodDescriptionintReturns the code of the horizontal dpad axis, if existsintReturns the code of the vertical dpad axis, if existsintReturns the code of the left bumper axis, used to increase the velocity.intReturns the code of the left stick horizontal axis, that produces: Roll rotation in focus mode Horizontal lateral movement in free modedoubleSensitivity of left stick axis.intReturns the code of the left stick vertical axis, that controls the forward and backward movementdoubleSensitivity of left stick vertical axisintReturns the code of the left trigger axis, used to decrease the velocity.doubleGets the sensitivity of the left trigger.intReturns the code of the right bumper axis, used to increase the velocity.intReturns the code of the Right stick horizontal axis, that produces: Vertical rotation around focus in focus mode Vertical look rotation (pitch) in free modedoubleSensitivity of pitch axis.intReturns the code of the right stick vertical axis, that produces: Horizontal rotation around focus in focus mode Horizontal look rotation (yaw) in free modedoubleSensitivity of right stick vertical axis.intReturns the code of the right trigger axis, used to increase the velocity.doubleGets the sensitivity of the right trigger.doublePower to apply to the linear value: val = val^powintReturns the code of the A buttonintReturns the code of the B buttonintReturns the code of the dpad-down buttonintReturns the code of the dpad-left buttonintReturns the code of the dpad-right buttonintReturns the code of the dpad-up buttonintReturns the code of the LB buttonintReturns the code of the left stick buttonintReturns the code of the LT buttonintReturns the code of the RB buttonintReturns the code of the right stick buttonintReturns the code of the RT buttonintReturns the code of the select buttonintReturns the code of the start buttonintReturns the code of the X buttonintReturns the code of the Y buttondoubleThe configured axis zero point.static IGamepadMappingsreadGamepadMappings(String mappingsFile)
-
Constructor Details
-
GamepadMappings
Create empty controller mappings. -
GamepadMappings
-
-
Method Details
-
persist
Persist the current mappings to the given path- Parameters:
path- Pointer to the file- Returns:
- True if operation succeeded
-