# ControllerButtonControl (Slick - The 2D Library)
Date: 2013-06-03

## org.newdawn.slick.command
Class ControllerButtonControl

    java.lang.Object
      org.newdawn.slick.command.ControllerButtonControl

All Implemented Interfaces:
  Control

    public class ControllerButtonControl

extends java.lang.Object

A control indicating that a gamepad/joystick button must be pressed or released to invoke an command.

Author:
  kevin

Field Summary
`protected static int` `BUTTON_EVENT` Indicates a button was pressed
`protected static int` `DOWN_EVENT` Indicates down was pressed
`protected static int` `LEFT_EVENT` Indicates left was pressed
`protected static int` `RIGHT_EVENT` Indicates right was pressed
`protected static int` `UP_EVENT` Indicates up was pressed

Constructor Summary
`ControllerButtonControl(int controllerIndex, int button)` Create a new control based on a controller input

Method Summary
`boolean` `equals(java.lang.Object o)`
`int` `hashCode()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### BUTTON_EVENT

    protected static final int BUTTON_EVENT

  Indicates a button was pressed

  See Also:
    Constant Field Values

### LEFT_EVENT

    protected static final int LEFT_EVENT

  Indicates left was pressed

  See Also:
    Constant Field Values

### RIGHT_EVENT

    protected static final int RIGHT_EVENT

  Indicates right was pressed

  See Also:
    Constant Field Values

### UP_EVENT

    protected static final int UP_EVENT

  Indicates up was pressed

  See Also:
    Constant Field Values

### DOWN_EVENT

    protected static final int DOWN_EVENT

  Indicates down was pressed

  See Also:
    Constant Field Values

Constructor Detail

### ControllerButtonControl

    public ControllerButtonControl(int controllerIndex,
                                   int button)

  Create a new control based on a controller input

  Parameters:
    `controllerIndex` - The index of the controller to listen to
    `button` - The index of the button that causes the command

Method Detail

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    `equals` in class `java.lang.Object`
  See Also:
    `Object.equals(java.lang.Object)`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`
  See Also:
    `Object.hashCode()`

Copyright © 2006 New Dawn Software. All Rights Reserved.