A Controller object represents a connected physical game controller. More...
Public Types | |
enum | Key |
Controllers' standard key Controller receives only standard key which contained within enum Key by default. | |
Public Member Functions | |
const std::string & | getDeviceName () const |
Gets the name of this Controller object. More... | |
local | getDeviceName () |
Gets the name of this Controller object. More... | |
int | getDeviceId () const |
Gets the Controller id. More... | |
bool | isConnected () const |
Indicates whether the Controller is connected. | |
local | isConnected () |
Indicates whether the Controller is connected. | |
const KeyStatus & | getKeyStatus (int keyCode) |
Get key status by key code. More... | |
local | getKeyStatus ( local keyCode) |
Get key status by key code. More... | |
void | receiveExternalKeyEvent (int externalKeyCode, bool receive) |
Activate receives key event from external key. More... | |
void | setTag (int tag) |
Changes the tag that is used to identify the controller easily. More... | |
int | getTag () const |
Returns a tag that is used to identify the controller easily. More... | |
Static Public Member Functions | |
static const std::vector < Controller * > & | getAllController () |
Gets all Controller objects. More... | |
local | getAllController () |
Gets all Controller objects. More... | |
static Controller * | getControllerByTag (int tag) |
Gets a Controller object with tag. More... | |
local | getControllerByTag ( local tag) |
Gets a Controller object with tag. More... | |
static void | startDiscoveryController () |
Start discovering new controllers. More... | |
static void | stopDiscoveryController () |
Stop the discovery process. More... | |
A Controller object represents a connected physical game controller.
|
inlinestatic |
Gets all Controller objects.
all Controller objects.
|
inlinestatic |
Gets all Controller objects.
all Controller objects.
|
static |
Gets a Controller object with tag.
An identifier to find the controller. A Controller object.
|
static |
Gets a Controller object with tag.
An identifier to find the controller. A Controller object.
|
static |
Start discovering new controllers.
The API only work on the IOS platform. Empty implementation on other platform.
|
static |
Start discovering new controllers.
The API only work on the IOS platform. Empty implementation on other platform.
|
static |
Stop the discovery process.
The API only work on the IOS platform.Empty implementation on other platform.
|
static |
Stop the discovery process.
The API only work on the IOS platform.Empty implementation on other platform.
|
inline |
Gets the name of this Controller object.
The name of the Controller object. 8
|
inline |
Gets the name of this Controller object.
The name of the Controller object. 8
|
inline |
Gets the Controller id.
The Controller id.
|
inline |
Gets the Controller id.
The Controller id.
const KeyStatus& getKeyStatus | ( | int | keyCode | ) |
Get key status by key code.
key status.
local getKeyStatus | ( | local | keyCode | ) |
Get key status by key code.
key status.
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.
The API only work on the android platform for support diversified game controller.
External key code. 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.
The API only work on the android platform for support diversified game controller.
External key code. True if external key event on this controller should be receive, false otherwise.
|
inline |
Changes the tag that is used to identify the controller easily.
A integer that identifies the controller.
|
inline |
Changes the tag that is used to identify the controller easily.
A integer that identifies the controller.
|
inline |
Returns a tag that is used to identify the controller easily.
An integer that identifies the controller.
|
inline |
Returns a tag that is used to identify the controller easily.
An integer that identifies the controller.