Exemple #1
0
UILabel* UILabel::create()
{
	UILabel *node = new UILabel();
	if (node)
	{
		node->autorelease();
		return node;
	}
	CC_SAFE_DELETE(node);
	return NULL;
}
Exemple #2
0
UILabel* UILabel::create()
{
    UILabel* widget = new UILabel();
    if (widget && widget->init())
    {
        widget->autorelease();
        return widget;
    }
    CC_SAFE_DELETE(widget);
    return nullptr;
}
Exemple #3
0
NS_CC_BEGIN
UILabel* UILabel::create(const char *content,float fontSize)
{
	UILabel *node = new UILabel();
	if (node)
	{
		if (node->initWithContent(content,fontSize))
		{
			node->autorelease();
			return node;
		}
	}
	CC_SAFE_DELETE(node);
	return NULL;
}