本文整理汇总了C++中CLayout::removeFromParent方法的典型用法代码示例。如果您正苦于以下问题:C++ CLayout::removeFromParent方法的具体用法?C++ CLayout::removeFromParent怎么用?C++ CLayout::removeFromParent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLayout
的用法示例。
在下文中一共展示了CLayout::removeFromParent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onEnter
void CVipCard::onEnter()
{
BaseLayer::onEnter();
//确定
CButton* pConfirm = (CButton*)m_ui->findWidgetById("confirm");
pConfirm->setOnClickListener(this, ccw_click_selector(CVipCard::onConfirm));
CButton* cancel = (CButton*)m_ui->findWidgetById("cancel");
cancel->setOnClickListener(this, ccw_click_selector(CVipCard::onCancel));
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(CVipCard::onClose));
this->addChild(pClose, 999);
CImageViewScale9* pRect1 = (CImageViewScale9*)m_ui->findWidgetById("rect1");
m_cardText = CursorTextField::textFieldWithPlaceHolder("", FONT_NAME, 29, CCSize(690, 110), ccBLACK);
m_cardText->setPriority(this->getTouchPriority());
m_cardText->setLimitNum(17);
m_cardText->setAnchorPoint(ccp(0, 0.5f));
m_cardText->setPosition( ccp(pRect1->getPositionX()-440, pRect1->getPositionY()));
m_ui->addChild(m_cardText, 999);
//展示区图片
CLayout *pShowInfo = CLayout::create();
CScrollView *pScroll = (CScrollView*)m_ui->findWidgetById("scroll_info");
pScroll->setDirection(eScrollViewDirectionVertical);
pScroll->setBounceable(false);
pScroll->getContainer()->addChild(pShowInfo);
CCSize size = CCSize(957, 471);
pShowInfo->setContentSize(size);
pScroll->setContainerSize(size);
pShowInfo->setPosition(ccp(pScroll->getContainerSize().width*0.5f, pScroll->getContainerSize().height*0.5f));
pScroll->setContentOffsetToTop();
//嫁接内容
CLayout* pLayout = (CLayout*)findWidgetById("layer_info");
pLayout->retain();
pLayout->removeFromParent();
pShowInfo->addChild(pLayout);
pLayout->release();
pLayout->setPosition(ccp(size.width/2, size.height/2+10));
}