sprite: CCSprite* pSprite2 = CCSprite::create("HelloWorld.png");
CC_BREAK_IF(! pSprite2);
pSprite2->setPosition(ccp(180, 230));
this->addChild(pSprite2,2);
按钮: CCMenuItemImage *pCloseItem = CCMenuItemImage::create(
"CloseNormal.png",
"CloseSelected.png",
this,
menu_selector(HelloWorld::menuCloseCallback));
CC_BREAK_IF(! pCloseItem);
pCloseItem->setPosition(ccp(CCDirector::sharedDirector()->getWinSize().width - 20, 20));
CCMenu* pMenu = CCMenu::create(pCloseItem, NULL);
pMenu->setPosition(CCPointZero);
CC_BREAK_IF(! pMenu);
this->addChild(pMenu, 1);
label : CCLabelTTF* pLabel = CCLabelTTF::create("Hello World", "Arial", 24);
CC_BREAK_IF(! pSprite2);
pSprite2->setPosition(ccp(180, 230));
this->addChild(pSprite2,2);
按钮: CCMenuItemImage *pCloseItem = CCMenuItemImage::create(
"CloseNormal.png",
"CloseSelected.png",
this,
menu_selector(HelloWorld::menuCloseCallback));
CC_BREAK_IF(! pCloseItem);
pCloseItem->setPosition(ccp(CCDirector::sharedDirector()->getWinSize().width - 20, 20));
CCMenu* pMenu = CCMenu::create(pCloseItem, NULL);
pMenu->setPosition(CCPointZero);
CC_BREAK_IF(! pMenu);
this->addChild(pMenu, 1);
label : CCLabelTTF* pLabel = CCLabelTTF::create("Hello World", "Arial", 24);