Exemplo n.º 1
0
CLabelAtlas* TuiManager::createLabelAtlas(float tag, const char* num, const char* imgPath,float x,float y,float w,float h,float rotation){
	CLabelAtlas *pLabAtlas = CLabelAtlas::create(num, imgPath, w / 12, h, 48);
	pLabAtlas->setRotation(rotation);
	pLabAtlas->setPosition(Vec2(x,-y));
	pLabAtlas->setTag(tag);
	return pLabAtlas;
}
Exemplo n.º 2
0
bool CLabelAtlasTest::init()
{
	CLabelTestSceneBase::init();
	setTitle("CLabelBasicTest");
	setDescription("CLabelAtlas extern CCLabelAtlas (test event)");

	CLabelAtlas* pText = CLabelAtlas::create(":;0123456789", "num.png", 26, 34, 48);
	pText->setTouchEnabled(true);
	pText->setAnchorPoint(Vec2(0.5, 0.5));
	pText->setPosition(Vec2(480, 320));
	pText->setOnTouchBeganListener(this, ccw_touchbegan_selector(CLabelAtlasTest::onTouchBegan));
	pText->setOnTouchEndedListener(this, ccw_touchevent_selector(CLabelAtlasTest::onTouchEnded));
	pText->setOnTouchCancelledListener(this, ccw_touchevent_selector(CLabelAtlasTest::onTouchEnded));
	m_pWindow->addChild(pText);

	return true;
}
Exemplo n.º 3
0
CLabelAtlas* TuiManager::createLabelAtlas(float tag,const char* imgPath,float x,float y,float w,float h,float rotation){
	CLabelAtlas *pLabAtlas = CLabelAtlas::create("123456",imgPath,w/12,h,48);
	pLabAtlas->setPosition(Point(x,-y));
	pLabAtlas->setTag(tag);
	return pLabAtlas;
}