registering closing of irr::gui:IGUIWindow

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.
Post Reply
rayaken

registering closing of irr::gui:IGUIWindow

Post by rayaken »

hi,

my situation: i want to have a modal dialog, so after creating and showing the window, ignore all input on the main window. i want to "activate" the main window after closing the little window. how do i register the closing of the little window? can i get it through the irr::IEventReceiver? i so then how?

thanx in advance for any help
rayaken

can't be that difficult

Post by rayaken »

i can't believe that it is really that difficult, but perhaps my previous post was a bit confusing so here again my problem in some simple words:

i created a irr::gui::IGUIWindow and i want to know when the user closes this window?

please, i need some help on this one. don't let my "project" fail in such an early state. =(
Boogle
Posts: 162
Joined: Fri Nov 21, 2003 3:16 pm
Location: Toronto, Canada

Post by Boogle »

Have you set up a receiver for events? If so, in your receiver object, check if the event type is a gui event (event.EventType == EET_GUI_EVENT). If it is you can access event.GUIEvent.Caller to get a pointer to the GUI element that created the event, and event.GUIEvent.EventType to get the ID of the actual event.

Here is a link to the documentation detailing the event.GUIEvent.EventType possibilities:

http://irrlicht.sourceforge.net/docu/na ... i.html#a55
Guest

Post by Guest »

did that, but i'll try it with the new release. thanx anyway.
rayaken

Post by rayaken »

i set up the event receiver but it won't receive any gui event on pressing the closing button. it will only receive an mouse input event (the mouse button pressed/clicked event).
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

are you already sending GUI events to some other handler somewhere?

if you are, you should check the ID of the sending event before passing it off to your original window, to decide if it belongs to something in you IWindow. ...just a guess
a screen cap is worth 0x100000 DWORDS
Post Reply