本文整理汇总了C++中CButton::getParent方法的典型用法代码示例。如果您正苦于以下问题:C++ CButton::getParent方法的具体用法?C++ CButton::getParent怎么用?C++ CButton::getParent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CButton
的用法示例。
在下文中一共展示了CButton::getParent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onUserStone
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();
}
示例2: onClickDownloadPackage
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);
}
示例3: onResignDay
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);
}