Hi guys?
I have just tested keyBackClicked on Cocos2dx, thanks for help, I override this method and it runs well on Android. Here is my method:
on init method:
auto keyboardListener = EventListenerKeyboard::create();
keyboardListener->onKeyReleased = CC_CALLBACK_2(SceneTetris::onKeyReleased, this);
_eventDispatcher->addEventListenerWithSceneGraphPriority(keyboardListener, this);
setKeypadEnabled(true);
void TestKey::onKeyReleased(cocos2d::EventKeyboard::KeyCode keyCode, cocos2d::Event * event){
}
The TestKey is extends from CCLayer.
However in WP8, I’m unable to hook into this function, the app will terminate immediately (due to logic on Cocos2dRenderer.cpp).
How can I continue to use onKeyRealeased for WP8?