void MainMenuScene::menuSelector(CCObject* pSender) { SpriteButton *selectedOpt = (SpriteButton*) pSender; CCScene *scene; switch (selectedOpt->getTag()) { case 1: scene = CategoryScene::create(); break; case 2: scene = ProfilaScene::create(); break; case 3: #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) openURLJNI("http://jakina.eu/"); #else CCApplication::sharedApplication()->openURL("http://jakina.eu/"); #endif break; default: break; } CCDirector *pDirector = CCDirector::sharedDirector(); CCTransitionFade *tscene = CCTransitionFade::create(0.5, scene); pDirector->replaceScene(tscene); }
bool Application::openURL(const std::string &url) { return openURLJNI(url.c_str()); }