예제 #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;
}
예제 #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;
}