当前位置: 首页>>代码示例>>C++>>正文


C++ CCMenuItemFont::setOpacity方法代码示例

本文整理汇总了C++中CCMenuItemFont::setOpacity方法的典型用法代码示例。如果您正苦于以下问题:C++ CCMenuItemFont::setOpacity方法的具体用法?C++ CCMenuItemFont::setOpacity怎么用?C++ CCMenuItemFont::setOpacity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CCMenuItemFont的用法示例。


在下文中一共展示了CCMenuItemFont::setOpacity方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CCRectMake

bool S411FeedBack::setUpSubClass2()
{
	bool bRet = false;
	do
	{
        refreshItemImage->setOpacity(0);
        refreshItemImage->setEnabled(false);
        isMale = true;
        AppDelegate::S51TextViewStr = "";
        
        feedBackSp = CCSprite::create("S41FeedBack.png");
        feedBackSp->setPosition(ccp(530,330));
        this->addChild(feedBackSp, zNum, 10);
        
        float pox = 487;
        float poy = 477;
        
        male = CCSprite::create("S49RadioSelected.png");
        male->setPosition(ccp(pox,poy));
        this->addChild(male,zNum);
        
        CCSprite * sprite1 = CCSprite::create();
        CCSprite * sprite2 = CCSprite::create();
        CCMenuItemSprite * maleItem = CCMenuItemSprite::create(
                                                               sprite1,
                                                               sprite2,
                                                               this,
                                                               menu_selector(S411FeedBack::changeSex));
        maleItem->setPosition(male->getPosition());
        maleItem->setContentSize(CCSizeMake(male->getContentSize().width*3, male->getContentSize().height*3));
        _menu->addChild(maleItem,zNum);
        
        
        
        
        famale =CCSprite::create("S49RadioSelected.png");
        famale->setPosition(ccp(pox+45,poy));
        this->addChild(famale,zNum);
        famale->setOpacity(0);
        
        CCSprite * sprite3 = CCSprite::create();
        CCSprite * sprite4 = CCSprite::create();
        CCMenuItemSprite * faMaleItem = CCMenuItemSprite::create(sprite3, sprite4,this,menu_selector(S411FeedBack::changeSex));
        faMaleItem->setPosition(famale->getPosition());
        faMaleItem->setContentSize(CCSizeMake(famale->getContentSize().width*3, famale->getContentSize().height*3));
        _menu->addChild(faMaleItem,zNum);
        
        
        float editFontSize = 10;
        float addWidth = 128.0;
        float addHeight = 45;
        const char * input = "";
        
        CCScale9Sprite *sacel9SprG1=CCScale9Sprite::create("S49Submit.png");
        sacel9SprG1->setOpacity(1);
        nameBox=CCEditBox::create(CCSizeMake(sacel9SprG1->getContentSize().width*2.8, sacel9SprG1->getContentSize().height), sacel9SprG1);
        nameBox->setFontName(s1FontName_macro);
        nameBox->setFontSize(editFontSize);
        nameBox->setFontColor(ccBLACK);
        nameBox->setInputMode(kEditBoxInputModeAny);
        nameBox->setPlaceHolder(input);
        nameBox->setPosition(ccp(240+addWidth,430+addHeight));
        this->addChild(nameBox,zNum);
        nameBox->setDelegate(this);
        
        
        
        
        CCScale9Sprite *sacel9SprG2=CCScale9Sprite::create("S49Submit.png");
        sacel9SprG2->setOpacity(1);
        telBox=CCEditBox::create(CCSizeMake(sacel9SprG2->getContentSize().width*2.8, sacel9SprG2->getContentSize().height), sacel9SprG2);
        telBox->setFontSize(editFontSize);
        telBox->setFontColor(ccBLACK);
        telBox->setPlaceHolder(input);
        telBox->setPosition(ccp(240+addWidth,400+addHeight));
        this->addChild(telBox,zNum);
        telBox->setDelegate(this);
        
        
        CCScale9Sprite *sacel9SprG3=CCScale9Sprite::create("S49Submit.png");
        sacel9SprG3->setOpacity(1);
        mobilePhoneBox=CCEditBox::create(CCSizeMake(sacel9SprG3->getContentSize().width*2.8, sacel9SprG3->getContentSize().height), sacel9SprG3);
        mobilePhoneBox->setFontSize(editFontSize);
        mobilePhoneBox->setFontColor(ccBLACK);
        mobilePhoneBox->setPlaceHolder(input);
        mobilePhoneBox->setPosition(ccp(240+addWidth,365+addHeight));
        this->addChild(mobilePhoneBox,zNum);
        mobilePhoneBox->setDelegate(this);
        
        
        
        CCScale9Sprite *sacel9SprG4=CCScale9Sprite::create("S49Submit.png");
        sacel9SprG4->setOpacity(1);
        mailBox=CCEditBox::create(CCSizeMake(sacel9SprG4->getContentSize().width*2.8, sacel9SprG4->getContentSize().height), sacel9SprG4);
        mailBox->setFontSize(editFontSize);
        mailBox->setFontColor(ccBLACK);
        mailBox->setPlaceHolder(input);
        mailBox->setPosition(ccp(240+addWidth,335+addHeight));
        this->addChild(mailBox,zNum);
        mailBox->setDelegate(this);
//.........这里部分代码省略.........
开发者ID:Ratel13,项目名称:JinRiCompany,代码行数:101,代码来源:S411FeedBack.cpp


注:本文中的CCMenuItemFont::setOpacity方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。