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; }
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; }