本文整理汇总了C++中CCTextFieldTTF::retain方法的典型用法代码示例。如果您正苦于以下问题:C++ CCTextFieldTTF::retain方法的具体用法?C++ CCTextFieldTTF::retain怎么用?C++ CCTextFieldTTF::retain使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCTextFieldTTF
的用法示例。
在下文中一共展示了CCTextFieldTTF::retain方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: creatPasswordText
void LogIntoLayer::creatPasswordText()
{
CCSize winSize = CCDirector::sharedDirector()->getWinSize();
CCPoint pos = CCPointMake(winSize.width*220/500,winSize.height*22/50);
CCTextFieldTTF* text = CCTextFieldTTF::textFieldWithPlaceHolder(
"Input Your Password...","Arial",20);
text->setColor(ccc3(INPUT_R,INPUT_G,INPUT_B));
text->setPosition(pos);
this->addChild(text,20);
text->setDelegate(this);
text->retain();
passwordText = text;
}
示例2: creatUsernameText
void RegisterLayer::creatUsernameText()
{
CCSize winSize = CCDirector::sharedDirector()->getWinSize();
CCPoint pos = CCPointMake(winSize.width*250/500,winSize.height*35/50);
CCTextFieldTTF* text = CCTextFieldTTF::textFieldWithPlaceHolder(
"Input Your Name...","Arial",20);
text->setColor(ccc3(INPUT_R,INPUT_G,INPUT_B));
text->setPosition(pos);
this->addChild(text,20);
text->setDelegate(this);
text->retain();
usernameText = text;
}