这篇教程C++ CCMessageBox函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CCMessageBox函数的典型用法代码示例。如果您正苦于以下问题:C++ CCMessageBox函数的具体用法?C++ CCMessageBox怎么用?C++ CCMessageBox使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CCMessageBox函数的23个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: CCMessageBoxvoid MenuLayer::menuCloseCallback(Ref* pSender){#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) CCMessageBox("You pressed the close button. Windows Store Apps do not implement a close button.", "Alert");#else Director::getInstance()->end();#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) exit(0);#endif#endif}
开发者ID:PIfagor,项目名称:StoneGame,代码行数:11,
示例2: switchvoid SetPanel::onClick(CCObject* ob){ CButton* btn = (CButton*)ob; int tag = btn->getTag(); switch(tag) { case 1: { if(this->getParent()) this->getParent()->removeChild(this); } break; case 2: { CNetClient::getShareInstance()->sendDataType(RoleExitMsg); //CSceneManager::sharedSceneManager()->getScene("CityScene")->release(); CCDirector::sharedDirector()->replaceScene(GETSCENE(LoginScene)); } break; case 3: { CNetClient::getShareInstance()->sendDataType(RoleExitMsg); CCDirector::sharedDirector()->end(); } break; case 4: { CCMessageBox(GETLANGSTR(1012), GETLANGSTR(1005)); //ShowTexttip(U8("此功能尚未开放,敬请期待"),RGB_RED); } break; case 5: { CCMessageBox(GETLANGSTR(1012), GETLANGSTR(1005)); //ShowTexttip(U8("此功能尚未开放,敬请期待"),RGB_RED); } break; default: break; }}
开发者ID:54993306,项目名称:Classes,代码行数:41,
示例3: CCMessageBoxvoid BeginScene::fbSessionCallback(int responseCode, const char *responseMessage){ if (responseCode != EziSocialWrapperNS::RESPONSE_CODE::FB_LOGIN_SUCCESSFUL) { CCMessageBox(responseMessage, "Facebook Login"); } else { CCLOG("Login Success!!!"); }}
开发者ID:ngocdu,项目名称:GameFireworksMultiplasform,代码行数:12,
示例4: CCMessageBoxvoid CMainMenuLayer::settingCallback(CCObject* pSender){#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) CCMessageBox("You pressed the close button. Windows Store Apps do not implement a close button.","Alert");#else CCScene* newScene = CSettingScene::create(); CCDirector::sharedDirector()->pushScene( newScene );#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) //exit(0);#endif#endif}
开发者ID:junggang,项目名称:blackbags,代码行数:12,
示例5: strcpybool CLevelManager::CreateFileFirstGame( const char* pc_FileName, int iNumOfLevel ){ bool result = true; string pathTest = CCFileUtils::sharedFileUtils()->getWriteablePath(); #if ANDROID char FullPath[256] = {0}; strcpy(FullPath,pathTest.c_str()); strcat(FullPath,"LevelInfo.txt"); FILE* pFile; pFile = fopen(FullPath,"r"); if (pFile != NULL) { result = false; fclose(pFile); } else { result = true; pFile = fopen(FullPath,"w+"); if (pFile != NULL) { fprintf(pFile,"%d/n",iNumOfLevel); for (int i = 0; i < iNumOfLevel; i ++) { if (i <= 5) { fprintf(pFile,"%d 0 0 1/n", (i+1) ); } else { fprintf(pFile,"%d 0 0 0/n", (i+1) ); } } fclose(pFile); //ResetLevelInfo(iNumOfLevel); return true; } else { CCMessageBox("Create first file failed","Error"); } } #endif return result;}
开发者ID:chiehfc,项目名称:protect-land,代码行数:53,
示例6: CCMessageBoxvoid CResultTitleLayer::mainSceneCallback(CCObject* pSender){#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) CCMessageBox("You pressed the close button. Windows Store Apps do not implement a close button.","Alert");#else CCScene* newScene = CMainScene::create(); CCDirector::sharedDirector()->replaceScene(CCTransitionFade::create(0.5, newScene) );#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) exit(0);#endif#endif}
开发者ID:BlackBags,项目名称:MonsterScramble,代码行数:12,
示例7: CCMessageBoxvoid BaseScene::fbIncomingRequestCallback(int responseCode, const char* responseMessage, int totalIncomingRequests){ if (totalIncomingRequests > 0) { int pendingRequest = EziFBIncomingRequestManager::sharedManager()->getPendingRequestCount(); CCString* message = CCString::createWithFormat("Total new requests = %d/n Total pending requests = %d./nGo to Request API Scene to see the list of incoming requets.", totalIncomingRequests, pendingRequest); CCMessageBox(message->getCString(), "fbIncomingRequestCallback"); } else { CCLOG("No new incoming request..."); }}
开发者ID:ezibyte,项目名称:EziSocialDemo,代码行数:13,
示例8: fileunsigned char* CCFileUtils::getFileData(const char* pszFileName, const char* pszMode, unsigned long * pSize){ string fullPath = s_strRelativePath + pszFileName; unsigned char * pData = CCFileUtils::getFileDataFromZip(s_strResourcePath.c_str(), fullPath.c_str(), pSize); if (! pData && getIsPopupNotify()) { std::string title = "Notification"; std::string msg = "Get data from file("; msg.append(pszFileName).append(") failed!"); CCMessageBox(msg.c_str(), title.c_str()); } return pData;}
开发者ID:94smart,项目名称:SimpleGameCocos2D-x,代码行数:13,
示例9: CCLOGvoid GameOverView::onYesClicked(){ CCLOG("Yes!"); CCLOG("Quit the game!");#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) CCMessageBox("You pressed the close button. Windows Store Apps do not implement a close button.","Alert");#else CCDirector::sharedDirector()->end();#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) exit(0);#endif#endif}
开发者ID:duongbadu,项目名称:Fighter,代码行数:13,
示例10: CCLOGvoid MoreDiamondDialog::onGetProfileCompleted( CCNode *sender, void *data ){ CCLOG("onGetProfileCompleted"); if (data != NULL) { CCDictionary *convertedData = (CCDictionary *)data; CCString* s = (CCString*)convertedData->objectForKey("isSuccess"); if (s->boolValue()) { CCLOG("CPP Get Profile Completed: TRUE"); string fbId = ((CCString*)convertedData->objectForKey("id"))->getCString(); string firstName = ((CCString*)convertedData->objectForKey("firstName"))->getCString(); string name = ((CCString*)convertedData->objectForKey("name"))->getCString(); string username = ((CCString*)convertedData->objectForKey("username"))->getCString(); string birthday = ((CCString*)convertedData->objectForKey("birthday"))->getCString(); string picture50x50 = ((CCString*)convertedData->objectForKey("picture"))->getCString(); //save DataManager::sharedDataManager()->SetFbID(fbId); DataManager::sharedDataManager()->SetFbFullName(name); DataManager::sharedDataManager()->SetName(name); DataManager::sharedDataManager()->SetFbUserName(username); ////////////////////////////////////////////////////////////////////////// NDKHelper::AddSelector("MoreDiamondDialog", "onGetAvatarCompleted", callfuncND_selector(MoreDiamondDialog::onGetAvatarCompleted), this); string w = "128"; string h = "128"; CCDictionary* prms = CCDictionary::create(); prms->setObject(CCString::create(fbId), "fbId"); prms->setObject(CCString::create(w), "width"); prms->setObject(CCString::create(h), "height"); SendMessageWithParams(string("GetAvatar"), prms); } else { CCLOG("CPP Get Profile Completed: FALSE"); CCMessageBox("Kh C++ CCNET_PROCESSOR_CLASS函数代码示例 C++ CCLOGINFO函数代码示例
|