コード例 #1
0
ファイル: LogIntoLayer.cpp プロジェクト: cruisehu/PongPongPia
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
0
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;
	
}