Exemplo n.º 1
0
CImageView *TuiManager::createImage(float tag, const char* file, float scaleX, float scaleY,float x, float y, float rotation){
	CImageView *pImg = m_isUseSpriteFrame ? CImageView::createWithSpriteFrameName(file) : CImageView::create(file);
	Size size = pImg->getContentSize();
	pImg->setPosition(Point(x,-y));
	pImg->setScale(scaleX, scaleY);
	pImg->setRotation(rotation);
	pImg->setTag(tag);
	return pImg;
}
Exemplo n.º 2
0
CImageView *TuiManager::createImage(float tag, const char* file, float scaleX, float scaleY, int flipX, int flipY, float x, float y, float rotation, int isUseFrame){
	CImageView *pImg = isUseFrame ? CImageView::createWithSpriteFrameName(file) : CImageView::create(file);
	Size size = pImg->getContentSize();
	pImg->setPosition(Vec2(x,-y));
	pImg->setFlippedX(flipX == 1);
	pImg->setFlippedY(flipY == 1);
	pImg->setScale(scaleX, scaleY);
	pImg->setRotation(rotation);
	pImg->setTag(tag);
	return pImg;
}