Exemplo n.º 1
0
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;
}
Exemplo n.º 2
0
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;
}