Package gaiasky.interafce
Class ControllerMappings
java.lang.Object
gaiasky.interafce.AbstractControllerMappings
gaiasky.interafce.ControllerMappings
- All Implemented Interfaces:
IControllerMappings
public class ControllerMappings extends AbstractControllerMappings
Reads inputListener mappings from a file
-
Field Summary
Fields inherited from class gaiasky.interafce.AbstractControllerMappings
AXIS_DPAD_H, AXIS_DPAD_V, AXIS_LSTICK_H, AXIS_LSTICK_H_SENS, AXIS_LSTICK_V, AXIS_LSTICK_V_SENS, AXIS_LT, AXIS_LT_SENS, 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
-
Constructor Summary
Constructors Constructor Description ControllerMappings(java.lang.String controllerName)
Create empty controller mappingsControllerMappings(java.lang.String controllerName, java.nio.file.Path mappingsFile)
Create a controller mappings instance from a *.controller file -
Method Summary
Modifier and Type Method Description boolean
persist(java.nio.file.Path path)
Persist the current mappings to the given pathMethods inherited from class gaiasky.interafce.AbstractControllerMappings
getAxisDpadH, getAxisDpadV, getAxisLstickH, getAxisLstickHSensitivity, getAxisLstickV, getAxisLstickVSensitivity, getAxisLT, getAxisLTSensitivity, getAxisRstickH, getAxisRstickHSensitivity, getAxisRstickV, getAxisRstickVSensitivity, getAxisRT, getAxisRTSensitivity, getAxisValuePower, getButtonA, getButtonB, getButtonDpadDown, getButtonDpadLeft, getButtonDpadRight, getButtonDpadUp, getButtonLB, getButtonLstick, getButtonLT, getButtonRB, getButtonRstick, getButtonRT, getButtonSelect, getButtonStart, getButtonX, getButtonY
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ControllerMappings
public ControllerMappings(java.lang.String controllerName)Create empty controller mappings -
ControllerMappings
public ControllerMappings(java.lang.String controllerName, java.nio.file.Path mappingsFile)Create a controller mappings instance from a *.controller file- Parameters:
controllerName
- Controller name, or nullmappingsFile
- The mappings file
-
-
Method Details
-
persist
public boolean persist(java.nio.file.Path path)Persist the current mappings to the given path- Parameters:
path
- Pointer to the file- Returns:
- True if operation succeeded
-