Is it by design that you cannot initialize an empty CCMenu and then add to it later using addChild()?
To initialize a new menu I need to give it atleast one item, otherwise it will fail.
CCMenu* menu = CCMenu::node();
menu~~>addChild;
menu~~>addChild(item2, 1);
menu~~>addChild;
“Run-Time Check Failure #3 - The variable ‘args’ is being used without being initialized.”
The following works fine.
CCMenu* menu = CCMenu::menuWithItems;
This works fine, too:
CCMenu* menu = CCMenu::menuWithItem;
menu~~>addChild(item2, 1);
menu->addChild(item3, 1);