Programatically create Menu

simed

19-10-2011 10:44:52

Is there a sample anywhere about how to build a menu in code, with say a child menu and a few items? My test doesn't even let me add a single menu item so I'd rather not rely on trial & error:
MyGUI::MenuCtrl *menu = top->createWidget<MyGUI::MenuCtrl>(
"MenuBar",MyGUI::IntCoord(0,0, clientRect.width,20),
MyGUI::Align::HStretch);
MyGUI::MenuItem *item1 = menu->addItem("item123",MyGUI::MenuItemType::Normal,"item123");