Ejemplo n.º 1
0
CImageView* CImageView::createWithTexture(CCTexture2D *pTexture, const CCRect& rect)
{
    CImageView *pobSprite = new CImageView();
    if (pobSprite && pobSprite->initWithTexture(pTexture, rect))
    {
        pobSprite->autorelease();
        return pobSprite;
    }
    CC_SAFE_DELETE(pobSprite);
    return NULL;
}
Ejemplo n.º 2
0
CImageView* CImageView::createWithTexture(CCTexture2D *pTexture)
{
    CImageView *pobSprite = new CImageView();
    if (pobSprite && pobSprite->initWithTexture(pTexture))
    {
		pobSprite->setTouchEnabled(false);
        pobSprite->autorelease();
        return pobSprite;
    }
    CC_SAFE_DELETE(pobSprite);
    return NULL;
}