CCScale9Sprite的使用

 

#include "cocos-ext.h"
USING_NS_CC_EXT; 

	//框中需要显示的label
	CCLabelTTF *label = CCLableTTF::create(...);
	label->setAnchorPoint(ccp(0.5f,0.5f));

	CCScale9Sprite* base = CCScale9Sprite::create("jiaoxue_duihuaqipao.png");
	base->addChild(label);
	base->setContentSize(CCSizeMake(
			label->getContentSize().width + LABLE_GAP_WITH_SCREEN*2,
			label->getContentSize().height+ LABLE_GAP_WITH_SCREEN*2,
		));
	label->setPosition(ccp(base->getContentSize().width/2,base->getContentSize().height/2));

  

 

 

 

posted @ 2014-01-17 15:34  、拂晓  阅读(412)  评论(0编辑  收藏  举报