why does Context Menus inside menu still have a ID if it can't be returned in the event?
I think that the method "addItem" should remove the chance of setting a ID so it can be lesser ambiguos. Many users relies on the fact that they get ID trough an event while they just need to check for the selected Item. I know that GUIElement all have an ID. but for context menus it can be just -1. It is nether returnedfor events regarding submenus. Or is ID usefull for something more complex?
[no bug]contextmenu
[no bug]contextmenu
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Re: contextmenu
It makes working with dynamic menus a lot easier. Basically it's often rather tricky figuring out otherwise which index an item has. And you can get it in the event by calling getItemCommandId on the selected item. Actually we usually get rather request in the other direction - adding also a custom-data field to menu-items and I've run in this often enough that I'll probably do that sooner or later.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm