Bug? Focused window ruins EGET_MENU_ITEM event?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Virror
Posts: 191
Joined: Mon May 02, 2011 3:15 pm

Post by Virror »

Using "irrGui->getRootGUIElement()->bringToFront(contextMenu);" worked like a charm, thatsk alot!

Only issue left now is how to get events from the sub-menu of the contextMenu.
CuteAlien
Admin
Posts: 9720
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

You do:

Code: Select all

if(event.GUIEvent.Caller == contextMenu) 
Which is not correct for the submenu - the caller is in this case the pointer to the submenu.
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
Virror
Posts: 191
Joined: Mon May 02, 2011 3:15 pm

Post by Virror »

Ahh, so the submenu counts as a different GUI, that explains it ; )

Code: Select all

if(event.GUIEvent.Caller == contextMenu->getSubMenu(1))
Now everything works as intended, thatnx alot for the help : D
Hopefully i have something to post on the projects page in a while ; )
Post Reply