public boolean isButtonPressed ( int index , int controller ) { if ( controller >= getControllerCount ( ) ) { return false ; } if ( controller == ANY_CONTROLLER ) { for ( int i = 0 ; i < controllers . size ( ) ; i ++ ) { if ( isButtonPressed ( index , i ) ) { return true ; } } return false ; } return ( ( Controller ) controllers . get ( controller ) ) . isButtonPressed ( index ) ; }
Check if controller button is pressed