Beispiel #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;
}
Beispiel #2
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;
}
Beispiel #3
0
CImageView* CImageView::create()
{
    CImageView *pSprite = new CImageView();
    if (pSprite && pSprite->init())
    {
        pSprite->autorelease();
        return pSprite;
    }
    CC_SAFE_DELETE(pSprite);
    return NULL;
}
Beispiel #4
0
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;
}
Beispiel #5
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;
}
Beispiel #6
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;
}