Exemplo n.º 1
0
CGridView* TuiManager::createGridView(float tag, const char* img, int column, int num, int cellWidth, int cellHeight, float x, float y, float w, float h, float rotation){
	CGridView* pView = CGridView::create(Size(w, h));
	m_isUseSpriteFrame ? pView->setBackgroundSpriteFrameName(img) : pView->setBackgroundImage(img);
	pView->setAutoRelocate(true);
	pView->setRotation(rotation);
	pView->setPosition(x, -y);
	pView->setColumns(column);
	pView->setCountOfCell(num);
	pView->setSizeOfCell(Size(cellWidth, cellHeight));
	pView->setTag(tag);
	return pView;
}
Exemplo n.º 2
0
CGridView* TuiManager::createGridView(float tag, Color4B color, int column, int num, int cellWidth, int cellHeight, float x, float y, float w, float h, float rotation){
	CGridView* pView = CGridView::create(Size(w, h));
	if (color.a != 0) pView->setBackgroundColor(color);
	pView->setAutoRelocate(true);
	pView->setRotation(rotation);
	pView->setPosition(x, -y);
	pView->setColumns(column);
	pView->setCountOfCell(num);
	pView->setSizeOfCell(Size(cellWidth, cellHeight));
	pView->setTag(tag);
	return pView;
}