com.jme3.input.event
Class JoyButtonEvent

java.lang.Object
  extended by com.jme3.input.event.InputEvent
      extended by com.jme3.input.event.JoyButtonEvent

public class JoyButtonEvent
extends InputEvent

Joystick button event.


Field Summary
 
Fields inherited from class com.jme3.input.event.InputEvent
consumed, time
 
Constructor Summary
JoyButtonEvent(int joyIdx, int btnIdx, boolean pressed)
           
 
Method Summary
 int getButtonIndex()
          The button index.
 int getJoyIndex()
          The joystick index.
 boolean isPressed()
          Returns true if the event was a button press, returns false if the event was a button release.
 
Methods inherited from class com.jme3.input.event.InputEvent
getTime, isConsumed, setConsumed, setTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JoyButtonEvent

public JoyButtonEvent(int joyIdx,
                      int btnIdx,
                      boolean pressed)
Method Detail

getButtonIndex

public int getButtonIndex()
The button index.

Returns:
button index.
See Also:
Joystick.assignButton(java.lang.String, int)

getJoyIndex

public int getJoyIndex()
The joystick index.

Returns:
joystick index.
See Also:
InputManager.getJoysticks()

isPressed

public boolean isPressed()
Returns true if the event was a button press, returns false if the event was a button release.

Returns:
true if the event was a button press, false if the event was a button release.