CImageView* CImageView::create(const char *pszFileName) { CImageView *pobSprite = new CImageView(); if (pobSprite && pobSprite->initWithFile(pszFileName)) { pobSprite->autorelease(); return pobSprite; } CC_SAFE_DELETE(pobSprite); return NULL; }
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::create() { CImageView *pSprite = new CImageView(); if (pSprite && pSprite->init()) { pSprite->autorelease(); return pSprite; } CC_SAFE_DELETE(pSprite); return NULL; }
CImageView* CImageView::createWithSpriteFrame(CCSpriteFrame *pSpriteFrame) { CImageView *pobSprite = new CImageView(); if (pSpriteFrame && pobSprite && pobSprite->initWithSpriteFrame(pSpriteFrame)) { 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; }
CImageView* CImageView::create(const char *pszFileName, const CCRect& rect) { CImageView *pobSprite = new CImageView(); if (pobSprite && pobSprite->initWithFile(pszFileName, rect)) { pobSprite->setTouchEnabled(false); pobSprite->autorelease(); return pobSprite; } CC_SAFE_DELETE(pobSprite); return NULL; }