How does one make that work…?
the back key function implement in 2.2.3 now. Thanks.
em,no it doesn’t… and it doesn’t work on android either…
I overloaded the keybackclicked method in the layer,and i also did: this->setkeypadenbled(true) and it did nothing…
Add this code in OnBackButtonPressed in your GameName.cpp in proj.wp8 folder
void GameName::OnBackButtonPressed(Object^ sender, BackPressedEventArgs^ args) { // Leave args->Handled set to false and the app will quit when user presses the back button on the phone //args->Handled = false; CCDirector::sharedDirector()->getKeypadDispatcher()->dispatchKeypadMSG( ccKeypadMSGType::kTypeBackClicked ); args->Handled = true; }
So if setKeypadEnabled is true, void keyBackClicked() will be called in your scene
thank you,finally it works
Thanks hitvan, I add some comment codes to let other develops to konw this problem. #4412, pr: https://github.com/cocos2d/cocos2d-x/pull/5836.
use that for Issue
hope its good to you