#include <CCController.h>
|
| enum | Key {
JOYSTICK_LEFT_X = 1000,
JOYSTICK_LEFT_Y,
JOYSTICK_RIGHT_X,
JOYSTICK_RIGHT_Y,
BUTTON_A,
BUTTON_B,
BUTTON_C,
BUTTON_X,
BUTTON_Y,
BUTTON_Z,
BUTTON_DPAD_UP,
BUTTON_DPAD_DOWN,
BUTTON_DPAD_LEFT,
BUTTON_DPAD_RIGHT,
BUTTON_DPAD_CENTER,
BUTTON_LEFT_SHOULDER,
BUTTON_RIGHT_SHOULDER,
AXIS_LEFT_TRIGGER,
AXIS_RIGHT_TRIGGER,
BUTTON_LEFT_THUMBSTICK,
BUTTON_RIGHT_THUMBSTICK,
BUTTON_START,
BUTTON_SELECT,
BUTTON_PAUSE,
KEY_MAX
} |
| | Controllers' standard key Controller receives only standard key which contained within enum Key by default. More...
|
| |
Controllers' standard key Controller receives only standard key which contained within enum Key by default.
| Enumerator |
|---|
| JOYSTICK_LEFT_X |
|
| JOYSTICK_LEFT_Y |
|
| JOYSTICK_RIGHT_X |
|
| JOYSTICK_RIGHT_Y |
|
| BUTTON_A |
|
| BUTTON_B |
|
| BUTTON_C |
|
| BUTTON_X |
|
| BUTTON_Y |
|
| BUTTON_Z |
|
| BUTTON_DPAD_UP |
|
| BUTTON_DPAD_DOWN |
|
| BUTTON_DPAD_LEFT |
|
| BUTTON_DPAD_RIGHT |
|
| BUTTON_DPAD_CENTER |
|
| BUTTON_LEFT_SHOULDER |
|
| BUTTON_RIGHT_SHOULDER |
|
| AXIS_LEFT_TRIGGER |
|
| AXIS_RIGHT_TRIGGER |
|
| BUTTON_LEFT_THUMBSTICK |
|
| BUTTON_RIGHT_THUMBSTICK |
|
| BUTTON_START |
|
| BUTTON_SELECT |
|
| BUTTON_PAUSE |
|
| KEY_MAX |
|
Controllers' standard key Controller receives only standard key which contained within enum Key by default.
| Enumerator |
|---|
| JOYSTICK_LEFT_X |
|
| JOYSTICK_LEFT_Y |
|
| JOYSTICK_RIGHT_X |
|
| JOYSTICK_RIGHT_Y |
|
| BUTTON_A |
|
| BUTTON_B |
|
| BUTTON_C |
|
| BUTTON_X |
|
| BUTTON_Y |
|
| BUTTON_Z |
|
| BUTTON_DPAD_UP |
|
| BUTTON_DPAD_DOWN |
|
| BUTTON_DPAD_LEFT |
|
| BUTTON_DPAD_RIGHT |
|
| BUTTON_DPAD_CENTER |
|
| BUTTON_LEFT_SHOULDER |
|
| BUTTON_RIGHT_SHOULDER |
|
| AXIS_LEFT_TRIGGER |
|
| AXIS_RIGHT_TRIGGER |
|
| BUTTON_LEFT_THUMBSTICK |
|
| BUTTON_RIGHT_THUMBSTICK |
|
| BUTTON_START |
|
| BUTTON_SELECT |
|
| BUTTON_PAUSE |
|
| KEY_MAX |
|
Controllers' standard key Controller receives only standard key which contained within enum Key by default.
| Enumerator |
|---|
| JOYSTICK_LEFT_X |
|
| JOYSTICK_LEFT_Y |
|
| JOYSTICK_RIGHT_X |
|
| JOYSTICK_RIGHT_Y |
|
| BUTTON_A |
|
| BUTTON_B |
|
| BUTTON_C |
|
| BUTTON_X |
|
| BUTTON_Y |
|
| BUTTON_Z |
|
| BUTTON_DPAD_UP |
|
| BUTTON_DPAD_DOWN |
|
| BUTTON_DPAD_LEFT |
|
| BUTTON_DPAD_RIGHT |
|
| BUTTON_DPAD_CENTER |
|
| BUTTON_LEFT_SHOULDER |
|
| BUTTON_RIGHT_SHOULDER |
|
| AXIS_LEFT_TRIGGER |
|
| AXIS_RIGHT_TRIGGER |
|
| BUTTON_LEFT_THUMBSTICK |
|
| BUTTON_RIGHT_THUMBSTICK |
|
| BUTTON_START |
|
| BUTTON_SELECT |
|
| BUTTON_PAUSE |
|
| KEY_MAX |
|
static const std::vector
<Controller*>
& getAllController |
( |
| ) |
|
|
inlinestatic |
| local getAllController |
( |
| ) |
|
|
inlinestatic |
Gets a controller with its tag.
- Parameters
-
| tag | An identifier to find the controller. |
| var getControllerByTag |
( |
var |
tag | ) |
|
|
static |
Gets a controller with its tag.
- Parameters
-
| tag | An identifier to find the controller. |
| local getControllerByTag |
( |
local |
tag | ) |
|
|
static |
Gets a controller with its tag.
- Parameters
-
| tag | An identifier to find the controller. |
| int getDeviceId |
( |
| ) |
const |
|
inline |
| const std::string& getDeviceName |
( |
| ) |
const |
|
inline |
| var getKeyStatus |
( |
var |
keyCode | ) |
|
| local getKeyStatus |
( |
local |
keyCode | ) |
|
Returns a tag that is used to identify the controller easily.
- Returns
- An integer that identifies the controller.
Returns a tag that is used to identify the controller easily.
- Returns
- An integer that identifies the controller.
Returns a tag that is used to identify the controller easily.
- Returns
- An integer that identifies the controller.
| bool isConnected |
( |
| ) |
const |
| void receiveExternalKeyEvent |
( |
int |
externalKeyCode, |
|
|
bool |
receive |
|
) |
| |
Activate receives key event from external key.
e.g. back,menu. Controller receives only standard key which contained within enum Key by default.
- Warning
- The API only work on the android platform for support diversified game controller.
- Parameters
-
| externalKeyCode | external key code |
| receive | true if external key event on this controller should be receive, false otherwise. |
| var receiveExternalKeyEvent |
( |
var |
externalKeyCode, |
|
|
var |
receive |
|
) |
| |
Activate receives key event from external key.
e.g. back,menu. Controller receives only standard key which contained within enum Key by default.
- Warning
- The API only work on the android platform for support diversified game controller.
- Parameters
-
| externalKeyCode | external key code |
| receive | true if external key event on this controller should be receive, false otherwise. |
| local receiveExternalKeyEvent |
( |
local |
externalKeyCode, |
|
|
local |
receive |
|
) |
| |
Activate receives key event from external key.
e.g. back,menu. Controller receives only standard key which contained within enum Key by default.
- Warning
- The API only work on the android platform for support diversified game controller.
- Parameters
-
| externalKeyCode | external key code |
| receive | true if external key event on this controller should be receive, false otherwise. |
Changes the tag that is used to identify the controller easily.
- Parameters
-
| tag | A integer that identifies the controller. |
Changes the tag that is used to identify the controller easily.
- Parameters
-
| tag | A integer that identifies the controller. |
| local setTag |
( |
local |
tag | ) |
|
|
inline |
Changes the tag that is used to identify the controller easily.
- Parameters
-
| tag | A integer that identifies the controller. |
static void
startDiscoveryController |
( |
| ) |
|
|
static |
To start discovering new controllers.
- Warning
- The API only work on the IOS platform.Empty implementation on Android
| var startDiscoveryController |
( |
| ) |
|
|
static |
To start discovering new controllers.
- Warning
- The API only work on the IOS platform.Empty implementation on Android
| local startDiscoveryController |
( |
| ) |
|
|
static |
To start discovering new controllers.
- Warning
- The API only work on the IOS platform.Empty implementation on Android
| static void stopDiscoveryController |
( |
| ) |
|
|
static |
End the discovery process.
- Warning
- The API only work on the IOS platform.Empty implementation on Android
| var stopDiscoveryController |
( |
| ) |
|
|
static |
End the discovery process.
- Warning
- The API only work on the IOS platform.Empty implementation on Android
| local stopDiscoveryController |
( |
| ) |
|
|
static |
End the discovery process.
- Warning
- The API only work on the IOS platform.Empty implementation on Android
| friend class ControllerImpl |
|
friend |
The documentation for this class was generated from the following file: