void CQuickProduct::onUserStone(CCObject* pSender) { CButton *btn = (CButton*)pSender; CPopTip *tip = (CPopTip*)btn->getParent()->getParent(); CCScaleTo *smal = CCScaleTo::create(0.2f,0.0f); CCSequence *seque = CCSequence::createWithTwoActions(smal, CCCallFuncN::create(this,callfuncN_selector(CQuickProduct::removeTip))); tip->runAction(seque); if (btn->getTag()==1) { /*tip->removeFromParent();*/ // CPopTip *pop = CPopTip::create("tips/bg.png"); // pop->addBeforeImage("tips/blackbg.png",0,20); // pop->addButton("public/btn_yellow_befor.png","public/btn_yellow_after.png",nullptr,3,1); // pop->buttonAddImage("public/font_queiding.png",3); // pop->addTextRichTip("沒有足夠的鑽石",ccWHITE,"Arail",18.0f); // /*pop->addRichImage("mainCity/icon_11.png");*/ // pop->reloadTextRich(ccp(VCENTER.x,VCENTER.y+50)); // // pop->setBottomOffset(-10); // pop->setTouchEnabled(true); // pop->setTouchPriority(-100); // pop->setButtonLisener(this,ccw_click_selector(CQuickProduct::onUserStone)); // this->addChild(pop,10,2); // pop->runScaleAction(); // ShowPopTextTip(GETLANGSTR(263)); } LayerManager::instance()->pop(); LayerManager::instance()->pop(); }
void LoginLayerUC::onClickDownloadPackage( CCObject* pSender ) { CButton* pBtn = (CButton*)pSender; if(pBtn->getTag()==PopTipConfirm) { CDownloadPackage* pLayer = CDownloadPackage::create(); pLayer->setDownloadPacakgeDelegate(this); CCDirector::sharedDirector()->getRunningScene()->addChild(pLayer, 1147); pLayer->downLoadPackage(); } else { //不更新,重启游戏,重复引导 //CJniHelper::getInstance()->restartGame(); CCDirector::sharedDirector()->end(); } ((CPopTip*)(pBtn->getParent()->getParent()))->removeFromParentAndCleanup(true); }
void CSignLayer::onResignDay(CCObject *pSender) { CButton *btn = (CButton*)pSender; if (btn->getTag()==PopTipConfirm) { //货币不足 if(!CheckGold(m_resignGold)) { //ShowPopTextTip(GETLANGSTR(203)); CShowToBuyResource* pShow = CShowToBuyResource::create(); pShow->showToBuyResourceByType(ShowBuyResourceGold); return; } else { m_bIsReSign = true; CPlayerControl::getInstance().sendSignReq(m_bIsReSign); } } ((CPopTip*)(btn->getParent()->getParent()))->onClose(nullptr); }