新建了一个mytext分组 便于管理
新建 cocos2d-x程序之后 系统自动生成一个 和helloworld 一样的默认程序
重复的部分就不赘述了
补充的部分
CCMenuItemImage *pCloseItem = CCMenuItemImage::create(//创建图片按钮
"CloseNormal.png", //正常状态下的
"CloseSelected.png", //按下之后的状态
this, //
menu_selector(HelloWorld::menuCloseCallback)); //按钮的响应函数
CCMenu* pMenu = CCMenu::create(pCloseItem, NULL);//创建菜单(按钮要添加到菜单中之后才能生效)
CCLabelTTF* pLabel = CCLabelTTF::create("Hello World", "Arial", 24);//创建文字显示“Hello World” “字
addchild(pLabel) //将pLable 添加到场景中(添加进去才能用)