Please clarify the "Menu and Popup" wiki tutorial thing.
Posted: Fri Apr 19, 2019 18:06
Maybe I'm just stupid or maybe this library can be really obtuse, in any case, I'm cheesed off because of this tutorial.
http://cegui.org.uk/wiki/Menu_and_Popup
To be precise, this part of it:
So, is the code in the code box "the wrong code", the "wrong code I 'might think about"?
Or is it the right approach? Or whatever. Ffffajdfsdf.
sdflgjsfgh.
(Sorry, pent up rage from trying to get into this very promising library for a while now.)
Thanks for your time and effort and all that. Whew, I'm sweating.
http://cegui.org.uk/wiki/Menu_and_Popup
To be precise, this part of it:
To add menuitems runtime to a popupMenu you add a CEGUI::Window childWindow to the popupMenu. You don't create a new CEGUI::MenuItem as you might think:
Code: Select all
CEGUI::PopupMenu* popupMenu = (CEGUI::PopupMenu*)CEGUI::WindowManager::getSingleton().getWindow("Root/Popup/PopupMenus/FirstPopup/AutoPopup");
CEGUI::Window* menuitem = CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/MenuItem");
menuitem->setText("Quit");
menuitem->subscribeEvent("Clicked", Event::Subscriber(&ScrollablePaneSample::fileQuit, this));
popupMenu->addChildWindow(menuitem);
So, is the code in the code box "the wrong code", the "wrong code I 'might think about"?
Or is it the right approach? Or whatever. Ffffajdfsdf.
sdflgjsfgh.
(Sorry, pent up rage from trying to get into this very promising library for a while now.)
Thanks for your time and effort and all that. Whew, I'm sweating.