Exemple #1
0
VBox* VBox::create(const cocos2d::Size &size)
{
    VBox* widget = new (std::nothrow) VBox();
    if (widget && widget->initWithSize(size))
    {
        widget->autorelease();
        return widget;
    }
    CC_SAFE_DELETE(widget);
    return nullptr;
}
Exemple #2
0
VBox* VBox::create()
{
    VBox* widget = new (std::nothrow) VBox();
    if (widget && widget->init())
    {
        widget->autorelease();
        return widget;
    }
    CC_SAFE_DELETE(widget);
    return nullptr;
}