|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttv.ouya.console.api.OuyaController
public class OuyaController
Utility class that contains codes for console buttons and axes.
Field Summary | |
---|---|
static java.util.List<java.lang.Integer> |
AVAILABLE_AXES
|
static java.util.List<java.lang.Integer> |
AVAILABLE_BUTTONS
|
static int |
AXIS_L2
Code for the left trigger axis |
static int |
AXIS_LS_X
Code for the left joystick x axis. |
static int |
AXIS_LS_Y
Code for the left joystick y axis. |
static int |
AXIS_R2
Code for the right trigger axis |
static int |
AXIS_RS_X
Code for the right joystick x axis. |
static int |
AXIS_RS_Y
Code for the right joystick y axis. |
static int |
BUTTON_A
Code for the A button. |
static int |
BUTTON_DPAD_DOWN
Code for the D-pad down button. |
static int |
BUTTON_DPAD_LEFT
Code for the D-pad left button. |
static int |
BUTTON_DPAD_RIGHT
Code for the D-pad right button. |
static int |
BUTTON_DPAD_UP
Code for the D-pad up button. |
static int |
BUTTON_L1
Code for the left bumper button. |
static int |
BUTTON_L2
Code for the left trigger button. |
static int |
BUTTON_L3
Code for left joystick button. |
static int |
BUTTON_O
Code for the O button. |
static int |
BUTTON_R1
Code for the right bumper button. |
static int |
BUTTON_R2
Code for the right trigger button. |
static int |
BUTTON_R3
Code for right joystick button. |
static int |
BUTTON_SYSTEM
Code for the system menu button. |
static int |
BUTTON_U
Code for the U button. |
static int |
BUTTON_Y
Code for the Y button. |
static int |
MAX_CONTROLLERS
|
Method Summary | |
---|---|
float |
getAxisValue(int ouyaAxis)
|
boolean |
getButton(int ouyaButton)
|
static OuyaController |
getControllerByDeviceId(int deviceId)
Get the current state of a controller |
static OuyaController |
getControllerByPlayer(int playerNum)
Get the controller for a specific player number |
android.view.InputDevice |
getDevice()
|
int |
getDeviceId()
|
int |
getPlayerNum()
|
static int |
interpret(int keyCode)
Deprecated. |
static boolean |
onGenericMotionEvent(android.view.MotionEvent event)
Called by the application to update the controller state |
static boolean |
onKeyDown(int keyCode,
android.view.KeyEvent event)
Called by the application to update the controller state |
static boolean |
onKeyUp(int keyCode,
android.view.KeyEvent event)
Called by the application to update the controller state |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BUTTON_O
public static final int BUTTON_U
public static final int BUTTON_Y
public static final int BUTTON_A
public static final int BUTTON_L1
public static final int BUTTON_L2
public static final int BUTTON_R1
public static final int BUTTON_R2
public static final int BUTTON_SYSTEM
public static final int AXIS_LS_X
public static final int AXIS_LS_Y
public static final int AXIS_RS_X
public static final int AXIS_RS_Y
public static final int AXIS_L2
public static final int AXIS_R2
public static final int BUTTON_DPAD_UP
public static final int BUTTON_DPAD_RIGHT
public static final int BUTTON_DPAD_DOWN
public static final int BUTTON_DPAD_LEFT
public static final int BUTTON_R3
public static final int BUTTON_L3
public static java.util.List<java.lang.Integer> AVAILABLE_AXES
public static java.util.List<java.lang.Integer> AVAILABLE_BUTTONS
public static final int MAX_CONTROLLERS
Method Detail |
---|
@Deprecated public static int interpret(int keyCode)
public static OuyaController getControllerByDeviceId(int deviceId)
public static OuyaController getControllerByPlayer(int playerNum)
public static boolean onGenericMotionEvent(android.view.MotionEvent event)
public static boolean onKeyDown(int keyCode, android.view.KeyEvent event)
public static boolean onKeyUp(int keyCode, android.view.KeyEvent event)
public android.view.InputDevice getDevice()
public int getDeviceId()
public float getAxisValue(int ouyaAxis)
public boolean getButton(int ouyaButton)
public int getPlayerNum()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |