Tag: cocos2d-x 3
-
Using the back button on Android with Cocos2d-x 3
Among the many changes done in version 3 of cocos2d-x CCLayer::backKeyClicked() has been deprecated. So how do you catch that back key click these day? Here’s how, you need to override Layer::onKeyReleased() and compare the value of keyCode to KEY_ESCAPE, as shown in the following code From there you just need to handle the click.…