요약. -> 안드로이드 하드웨어키인 back키를 누르면 종료되도록 한다.
1. I added a virtual void keyBackClicked(); in MainMenu.h
2. Then in MainMenu.cpp I added this->setIsKeypadEnabled(true);3. in MainMenu::init() and added a method:
void MainMenu::keyBackClicked() {
CCDirector::sharedDirector()->end();
}
void MainMenu::keyBackClicked() {
CCDirector::sharedDirector()->end();
}
출처 http://www.cocos2d-x.org/boards/6/topics/5041?r=10363#message-10363
'Programming > cocos2d-x' 카테고리의 다른 글
cocos 2d란 ? (0) | 2011.06.16 |
---|---|
[ Cocos 2d Example ] ActionManagerTest (0) | 2011.06.16 |