本文整理汇总了C++中CCEditBox::setFontSize方法的典型用法代码示例。如果您正苦于以下问题:C++ CCEditBox::setFontSize方法的具体用法?C++ CCEditBox::setFontSize怎么用?C++ CCEditBox::setFontSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCEditBox
的用法示例。
在下文中一共展示了CCEditBox::setFontSize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
bool MainMenuBarLayer::init()
{
if ( !CCLayer::init() )
{
return false;
}
CCDirector* pDirector = CCDirector::sharedDirector();
pDirector->getTouchDispatcher()->addTargetedDelegate(this, kCCMenuHandlerPriority, true);
// Display Size
CCSize visibleSize = pDirector->getVisibleSize();
// Background Image for menu bar
CCScale9Sprite* scale9Sprite = CCScale9Sprite::create("frame_v.png");
scale9Sprite->setContentSize(ccp(visibleSize.width,visibleSize.height/10));
scale9Sprite->setPosition(ccp(visibleSize.width/2,visibleSize.height - scale9Sprite->getContentSize().height/2));
this->addChild(scale9Sprite,4);
// Go back to privious scene
CCMenuItemImage* menuBackItem = CCMenuItemImage::create("frame_g.png","frame_p.png",this,menu_selector(MainMenuBarLayer::goBackScene));
menuBackItem->setPosition(ccp(menuBackItem->getContentSize().width/2, visibleSize.height - menuBackItem->getContentSize().height/2));
CCMenu* menuBack = CCMenu::create(menuBackItem, NULL);
menuBack->setPosition(CCPointZero);
//this->addChild(menuBack);
// Send a message
CCMenuItemImage* sendItemImg = CCMenuItemImage::create("frame_g.png","frame_p.png",this,menu_selector(MainMenuBarLayer::goBackScene));
sendItemImg->setPosition(ccp(visibleSize.width - sendItemImg->getContentSize().width/2, visibleSize.height - sendItemImg->getContentSize().height/2));
CCMenu* menuSend = CCMenu::create(sendItemImg, NULL);
menuSend->setPosition(CCPointZero);
//this->addChild(menuSend);
// EditBox
CCEditBox* editBox;
CCSize editBoxSize = CCSizeMake(100, 100);
editBox = CCEditBox::create(editBoxSize, CCScale9Sprite::create("frame_g.png"));
editBox->setPosition(ccp(visibleSize.width - sendItemImg->getContentSize().width/2, visibleSize.height - sendItemImg->getContentSize().height/2));
editBox->setFontColor(ccBLUE);
editBox->setPlaceHolder("");
editBox->setMaxLength(100);
editBox->setFontSize(24);
editBox->setDelegate(this);
editBox->setTag(_EDITBOX_);
editBox->setInputMode(kEditBoxInputModeAny);
//editBox->setReturnType(kKeyboardReturnTypeSend);
this->addChild(editBox,5);
// End
return true;
}