Hi,
I have my irrlicht window integrated into a from window but when i press a button or use the mouse the window receives the event insted of the irrlicht device.
can someone help me with this? Is it possible to forward events from the form to the irrlicht device?
thanks
device window handle device.OnEvent isn't working
The IrrlichtDevice has a function postEventFromUser which can be used for that. Basically you create for each event which you want to pass on a corresponding irr::SEvent and pass that to the device.
For example for mouse-move you create a EET_MOUSE_INPUT_EVENT with EMIE_MOUSE_MOVED as MouseInput.Event. Then set X, Y, Shift and Control for the MouseInput structure (in SEvent) and pass it to the device. Similar for mouse-clicks and key-pressed.
For example for mouse-move you create a EET_MOUSE_INPUT_EVENT with EMIE_MOUSE_MOVED as MouseInput.Event. Then set X, Y, Shift and Control for the MouseInput structure (in SEvent) and pass it to the device. Similar for mouse-clicks and key-pressed.
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