第一:
CCMenuItemFont
*itemFont = CCMenuItemFont::create(<#const char *value#>,<#cocos2d::CCObject *target#>,<#SEL_MenuHandler selector#>)
CCMenuItemFont *itemFont = CCMenuItemFont::
create
(
"
开始游戏
"
,
this
,
menu_selector
(HelloWorld::
menu_callBack
));
itemFont->
setTag
(
100
);
menu->
addChild
(itemFont);
第二:
CCMenuItemImage
*itemImage = CCMenuItemImage::create(<#const char *normalImage#>,<#const char *selectedImage#>,<#SEL_MenuHandler selector#>)
CCMenuItemImage
*itemImage =
CCMenuItemImage
::
create
(
"main_button1_1.png"
,
"main_button1_2.png"
,
menu_selector
(
HelloWorld
::
menu_callBack
));
itemImage->
setTag
(
200
);
menu->
addChild
(itemImage);
第三:
CCLabelBMFont
*bmFont = CCLabelBMFont::create(<#const char *str#>,<#const char *fntFile#>)
CCLabelBMFont
*bmFont =
CCLabelBMFont
::
create
(
"Start"
,
"MyFont2.fnt”
);
第四:
CCMenuItemLabel
*itemLabel =
CCMenuItemLabel
::
create
(bmFont,
menu_selector
(
HelloWorld
::
menu_callBack
));
itemLabel->
setTag
(
300
);
menu->
addChild
(itemLabel);
第五:
CCSprite
*sprite1 = CCSprite::create(<#const char *pszFileName#>);