Exemplo n.º 1
0
Scale9Sprite* Scale9Sprite::createWithSpriteFrameName(const std::string& spriteFrameName, const Rect& capInsets)
{
    Scale9Sprite* pReturn = new Scale9Sprite();
    if ( pReturn && pReturn->initWithSpriteFrameName(spriteFrameName, capInsets) )
    {
        pReturn->autorelease();
        return pReturn;
    }
    CC_SAFE_DELETE(pReturn);
    return NULL;
}
Exemplo n.º 2
0
Scale9Sprite* Scale9Sprite::createWithSpriteFrameName(const std::string& spriteFrameName, const Rect& capInsets)
{
    Scale9Sprite* ret = new (std::nothrow) Scale9Sprite();
    if (ret && ret->initWithSpriteFrameName(spriteFrameName, capInsets))
    {
        ret->autorelease();
        return ret;
    }
    CC_SAFE_DELETE(ret);
    return nullptr;
}
Exemplo n.º 3
0
Scale9Sprite* Scale9Sprite::createWithSpriteFrameName(const std::string& spriteFrameName)
{
    Scale9Sprite* ret = new (std::nothrow) Scale9Sprite();
    if (ret && ret->initWithSpriteFrameName(spriteFrameName, Rect::ZERO))
    {
        ret->autorelease();
        return ret;
    }
    CC_SAFE_DELETE(ret);

    log("Could not allocate Scale9Sprite()");
    return nullptr;
}
Exemplo n.º 4
0
Scale9Sprite* Scale9Sprite::createWithSpriteFrameName(const std::string& spriteFrameName)
{
    Scale9Sprite* pReturn = new Scale9Sprite();
    if ( pReturn && pReturn->initWithSpriteFrameName(spriteFrameName) )
    {
        pReturn->autorelease();
        return pReturn;
    }
    CC_SAFE_DELETE(pReturn);

    log("Could not allocate Scale9Sprite()");
    return NULL;
    
}