Example #1
0
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;
}
Example #2
0
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;
}
Example #3
0
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;
}
Example #4
0
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;
}