make a console getting events

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
chaoslion
Posts: 25
Joined: Sun Oct 30, 2005 1:44 pm

make a console getting events

Post 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?
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post 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
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Or use device->setEventReceiver(...) to switch between different event receivers...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply