CATextField* CATextField::createWithLayout(const DLayout& layout) { CATextField* textField = new CATextField(); if (textField && textField->initWithLayout(layout)) { textField->autorelease(); return textField; } CC_SAFE_DELETE(textField); return NULL; }
CATextField* CATextField::createWithFrame(const CCRect& frame) { CATextField *text = new CATextField(); if (text && text->initWithFrame(frame)) { text->autorelease(); return text; } CC_SAFE_DELETE(text); return NULL; }
CATextField* CATextField::create(CCRect frame) { CATextField *text = new CATextField(); if (text && text->initWithTextFieldFrame(frame)) { //text->initWithTextFrame(frame); text->autorelease(); return text; } CC_SAFE_DELETE(text); return NULL; }
CATextField* CATextField::createWithCenter(const CCRect& rect) { CATextField* textField = new CATextField(); if (textField && textField->initWithCenter(rect)) { textField->autorelease(); return textField; } CC_SAFE_DELETE(textField); return NULL; }