public class ControllerButtonControl extends ControllerControl
A ControllerButtonControl is a ControllerControl that represents a button on a game controller. The button is specified by a number that ranges from 0 to MAX_BUTTONS - 1 inclusive.
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_BUTTONS
The maximum number of buttons on each controller that Cell2D recognizes.
|
MAX_CONTROLLERS| Constructor and Description |
|---|
ControllerButtonControl(int controllerNum,
int buttonNum)
Constructs a ControllerButtonControl that represents the button with the
specified number on the controller with the specified number.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Returns whether the specified object is a ControllerButtonControl that is
equal to this ControllerButtonControl.
|
int |
getButtonNum()
Returns the number of this ControllerButtonControl's button.
|
java.lang.String |
getName()
Returns a short, descriptive, and unique String name for this Control.
|
int |
hashCode() |
getControllerNumgetControlpublic static final int MAX_BUTTONS
public ControllerButtonControl(int controllerNum,
int buttonNum)
throws InvalidControlException
controllerNum - The number of this ControllerButtonControl's
controllerbuttonNum - The number of this ControllerButtonControl's buttonInvalidControlException - if the specified controller or button
number is invalidpublic final int hashCode()
hashCode in class java.lang.Objectpublic final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The object to be compared with this ControllerButtonControlpublic java.lang.String getName()
Controlpublic final int getButtonNum()