| Modifier and Type | Field and Description |
|---|---|
| private static int | controllerCount
The number of controllers |
| private static ArrayList | controllers
The controllers available |
| private static boolean | created
Whether controllers were created |
| private static ControllerEvent | event
The current event |
| private static ArrayList | events
The current list of events |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static void | addEvent(ControllerEvent
The event to add to the list event)Add an event to the stack of events that have been caused |
| public static void | |
| public static void | |
| private static void | createController(Controller
The controller to add c)Utility to create a controller based on its potential sub-controllers |
| public static void | |
| public static Controller | Returns: The controller requestedThe index of the controller to retrieve index)Get a controller from the collection |
| public static int | Returns: The number of controllers availableRetrieve a count of the number of controllers |
| public static boolean | Returns: True if button was down, or false if releasedGets the state of the button that generated the current event |
| public static int | Returns: The index of the control that cause the current eventGet the index of the control that caused the current event |
| public static long | Returns: The timestamp assigned to the current eventGet the timestamp assigned to the current event |
| public static Controller | |
| public static float | Returns: The value on a x axis of the current eventGet the value on an X axis of the current event |
| public static float | Returns: The value on a y axis of the current eventGet the value on an Y axis of the current event |
| public static boolean | |
| public static boolean | Returns: True if the current event was caused by a axisCheck if the current event was caused by a axis |
| public static boolean | Returns: True if the current event was caused by a buttonCheck if the current event was caused by a button |
| public static boolean | Returns: True if the current event was caused by the POV x-axisCheck if the current event was cause by the POV x-axis |
| public static boolean | Returns: True if the current event was caused by the POV x-axisCheck if the current event was cause by the POV x-axis |
| public static boolean | Returns: True if the current event was cause by movement on the x-axisCheck if the current event was caused by movement on the x-axis |
| public static boolean | Returns: True if the current event was caused by movement on the y-axisCheck if the current event was caused by movement on the y-axis |
| public static boolean | Returns: True if there is still an event to processMove to the next event that has been stored. |
| public static void |
| controllerCount | back to summary |
|---|---|
| private static int controllerCount The number of controllers | |
| controllers | back to summary |
|---|---|
| private static ArrayList<JInputController> controllers The controllers available | |
| created | back to summary |
|---|---|
| private static boolean created Whether controllers were created | |
| event | back to summary |
|---|---|
| private static ControllerEvent event The current event | |
| events | back to summary |
|---|---|
| private static ArrayList<ControllerEvent> events The current list of events | |
| Controllers | back to summary |
|---|---|
| public Controllers() | |
| addEvent | back to summary |
|---|---|
| pack-priv static void addEvent(ControllerEvent event) Add an event to the stack of events that have been caused
| |
| clearEvents | back to summary |
|---|---|
| public static void clearEvents() Clear any events stored for the controllers in this set | |
| create | back to summary |
|---|---|
| public static void create() throws LWJGLException Initialise the controllers collection
| |
| createController | back to summary |
|---|---|
| private static void createController(Controller c) Utility to create a controller based on its potential sub-controllers
| |
| destroy | back to summary |
|---|---|
| public static void destroy() Destroys any resources used by the controllers | |
| getController | back to summary |
|---|---|
| public static Controller getController(int index) Get a controller from the collection
| |
| getControllerCount | back to summary |
|---|---|
| public static int getControllerCount() Retrieve a count of the number of controllers
| |
| getEventButtonState | back to summary |
|---|---|
| public static boolean getEventButtonState() Gets the state of the button that generated the current event
| |
| getEventControlIndex | back to summary |
|---|---|
| public static int getEventControlIndex() Get the index of the control that caused the current event
| |
| getEventNanoseconds | back to summary |
|---|---|
| public static long getEventNanoseconds() Get the timestamp assigned to the current event
| |
| getEventSource | back to summary |
|---|---|
| public static Controller getEventSource() Get the source of the current event
| |
| getEventXAxisValue | back to summary |
|---|---|
| public static float getEventXAxisValue() Get the value on an X axis of the current event
| |
| getEventYAxisValue | back to summary |
|---|---|
| public static float getEventYAxisValue() Get the value on an Y axis of the current event
| |
| isCreated | back to summary |
|---|---|
public static boolean isCreated()
| |
| isEventAxis | back to summary |
|---|---|
| public static boolean isEventAxis() Check if the current event was caused by a axis
| |
| isEventButton | back to summary |
|---|---|
| public static boolean isEventButton() Check if the current event was caused by a button
| |
| isEventPovX | back to summary |
|---|---|
| public static boolean isEventPovX() Check if the current event was cause by the POV x-axis
| |
| isEventPovY | back to summary |
|---|---|
| public static boolean isEventPovY() Check if the current event was cause by the POV x-axis
| |
| isEventXAxis | back to summary |
|---|---|
| public static boolean isEventXAxis() Check if the current event was caused by movement on the x-axis
| |
| isEventYAxis | back to summary |
|---|---|
| public static boolean isEventYAxis() Check if the current event was caused by movement on the y-axis
| |
| next | back to summary |
|---|---|
| public static boolean next() Move to the next event that has been stored.
| |
| poll | back to summary |
|---|---|
| public static void poll() Poll the controllers available. This will both update their state and generate events that must be cleared. | |