mirror of https://github.com/axmolengine/axmol.git
Add annotation for Controller class.
This commit is contained in:
parent
7a4dfda868
commit
4e4464c9c1
|
@ -41,6 +41,9 @@ class EventDispatcher;
|
|||
class Controller
|
||||
{
|
||||
public:
|
||||
/** Controllers' standard key
|
||||
* Controller receives only standard key which contained within enum Key by default.
|
||||
*/
|
||||
enum Key
|
||||
{
|
||||
JOYSTICK_LEFT_X = 1000,
|
||||
|
@ -87,9 +90,17 @@ public:
|
|||
static const int TAG_UNSET = -1;
|
||||
|
||||
static const std::vector<Controller*>& getAllController(){ return s_allController;}
|
||||
/** Gets a controller with its tag
|
||||
* @param tag An identifier to find the controller.
|
||||
*/
|
||||
static Controller* getControllerByTag(int tag);
|
||||
|
||||
/** To start discovering new controllers
|
||||
* @warning The API only work on the IOS platform.Empty implementation on Android
|
||||
*/
|
||||
static void startDiscoveryController();
|
||||
/** End the discovery process
|
||||
* @warning The API only work on the IOS platform.Empty implementation on Android
|
||||
*/
|
||||
static void stopDiscoveryController();
|
||||
|
||||
const std::string& getDeviceName() const { return _deviceName;}
|
||||
|
@ -108,7 +119,15 @@ public:
|
|||
*/
|
||||
void receiveExternalKeyEvent(int externalKeyCode,bool receive);
|
||||
|
||||
/** Changes the tag that is used to identify the controller easily.
|
||||
* @param tag A integer that identifies the controller.
|
||||
*/
|
||||
void setTag(int tag) { _controllerTag = tag;}
|
||||
/**
|
||||
* Returns a tag that is used to identify the controller easily.
|
||||
*
|
||||
* @return An integer that identifies the controller.
|
||||
*/
|
||||
int getTag() const { return _controllerTag;}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue