dear friends,
Anybody know how to make menu item with label and image…
I have done both separate ways but don’t know how to get them together…
I have done menu with images like this :
cocos2d::CCMenuItemImage *playScene = cocos2d::CCMenuItemImage::itemWithNormalImage(“normal.png”,
“selected.png”,
this,
menu_selector(SelectionMenuLayer::playScene) );
And then added all items to menu like this :
sceneSelectMenu = cocos2d::CCMenu::menuWithItems(playScene1,playScene2,playScene4,playScene3,playScene5,playScene6,NULL);
sceneSelectMenu->alignItemsInColumns(4,2,NULL); //(This is amazing…it handles positions of menu items automatically)
So all menu items are in grid now…
The positions of the menu items have auto handeled…
Now i want to include label text on each menu item…
I have tried the way of creating cclabelTTF and putting them at the menuitem positions.But i am getting unexpected positions of the child items of the menu.
Is anybody know how to get correct positions as seen on screen menu…
Thank you,
Viraj