本文整理汇总了C++中CCheckBox::setOnCheckListener方法的典型用法代码示例。如果您正苦于以下问题:C++ CCheckBox::setOnCheckListener方法的具体用法?C++ CCheckBox::setOnCheckListener怎么用?C++ CCheckBox::setOnCheckListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCheckBox
的用法示例。
在下文中一共展示了CCheckBox::setOnCheckListener方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onEnter
void CSignLayer::onEnter()
{
BaseLayer::onEnter();
//签到grid的cell
m_cell = (CLayout*)(m_ui->findWidgetById("Cell"));
m_cell->retain();
m_ui->removeChild(m_cell);
m_gridView = (CGridView*)m_ui->findWidgetById("scroll");
m_gridView->setDirection(eScrollViewDirectionVertical);
m_gridView->setCountOfCell(0);
m_gridView->setSizeOfCell(m_cell->getContentSize());
m_gridView->setAnchorPoint(ccp(0,0));
m_gridView->setColumns(5);
m_gridView->setAutoRelocate(false);
m_gridView->setDeaccelerateable(true);
m_gridView->setDataSourceAdapter(this,ccw_datasource_adapter_selector(CSignLayer::gridviewDataSource));
m_gridView->reloadData();
m_signLay = (CLayout*)(m_ui->findWidgetById("Sign"));
//退出
CButton* pClose = CButton::create("common/back.png", "common/back.png");
pClose->getSelectedImage()->setScale(1.1f);
pClose->setPosition(VLEFT+50, VTOP-50);
pClose->setOnClickListener(this,ccw_click_selector(CSignLayer::onClose));
this->addChild(pClose, 999);
//book
CCheckBox* pBook = (CCheckBox*)(m_ui->findWidgetById("book"));
pBook->setOnCheckListener(this,ccw_check_selector(CSignLayer::showHeroBook));
//按钮补签
CButton* pResign = (CButton*)m_ui->findWidgetById("buqian_btn");
pResign->setOnClickListener(this, ccw_click_selector(CSignLayer::onBtnResignDay));
//按钮签到
CButton* pSign = (CButton*)m_ui->findWidgetById("qiandao_btn");
pSign->setOnClickListener(this, ccw_click_selector(CSignLayer::onBtnSignDay));
GetTcpNet->registerMsgHandler(SignDataMsg,this, CMsgHandler_selector(CSignLayer::ProcessMsg));
GetTcpNet->registerMsgHandler(SignReqMsg,this, CMsgHandler_selector(CSignLayer::ProcessMsg));
}
示例2: onEnter
void CSmeltArmor::onEnter()
{
BaseLayer::onEnter();
//四个选择框
for (unsigned int i=0; i<4; ++i)
{
CCheckBox *checkBtn = (CCheckBox*)(m_pBaseInfo[i]->findWidgetById("check"));
checkBtn->setOnCheckListener(this,ccw_check_selector(CSmeltArmor::onCheckAttr));
}
//选择武器
CButton *select = (CButton*)(m_ui->findWidgetById("select"));
select->setOnClickListener(this, ccw_click_selector(CSmeltArmor::onSelectItem));
//洗练
CButton *refine = (CButton*)(m_ui->findWidgetById("refine"));
refine->setOnClickListener(this, ccw_click_selector(CSmeltArmor::onRefineItem));
//初始化火
initFire();
//旋转圈
CImageView *circleFire = (CImageView*)(m_ui->findWidgetById("fire_circle"));
circleFire->setScale(1.95f);
circleFire->runAction(CCRepeatForever::create(CCRotateBy::create(1.0f, 60)));
circleFire->runAction(CCRepeatForever::create(CCSequence::createWithTwoActions(CCScaleTo::create(1.2f, 2.1f), CCScaleTo::create(1.2f, 1.95f))));
GetTcpNet->registerMsgHandler(SmeltArmorMsg,this,CMsgHandler_selector(CSmeltArmor::proceesMessage));
GetTcpNet->registerMsgHandler(SmeltDataRequestMsg,this,CMsgHandler_selector(CSmeltArmor::proceesMessage));
CSceneManager::sharedSceneManager()->addMsgObserver(UPDATE_HERO, this, GameMsghandler_selector(CSmeltArmor::roleUpdate));
CSceneManager::sharedSceneManager()->addMsgObserver(UPDATE_ITEM_DATA, this, GameMsghandler_selector(CSmeltArmor::updateStar));
}