Page 1 of 1

make a console getting events

Posted: Mon Nov 27, 2006 2:59 pm
by chaoslion
Hello!

i have made a console class pretty much like the one in q3.
I´ve derived it from the IEventReceiver class, so it has the OnEvent function.
How can i actually send events to this receiver, since there´s already an active event receiver registered with the device.. how would you guys do it?

Posted: Mon Nov 27, 2006 4:32 pm
by vitek
If you already have an event receiver registered, you might want to consider forwarding unhandled messages to another event receiver or receivers. I posted code a long time ago on how do to this, but it is pretty simple to do. Here is a link.

You don't usually send events directly to your event recievers. The event receiver is a way for the irrlicht library to send messages back to the application. If you need to send a message, you would usually use one of the postEventFromUser() methods to send the message directly to the gui or the scene manager.

Travis

Posted: Mon Nov 27, 2006 5:21 pm
by Acki
Or use device->setEventReceiver(...) to switch between different event receivers...