How to terminate the device by just pushing cross button?
How to terminate the device by just pushing cross button?
The question sounds enough trivial, but a problem is if your app creates an ICameraSceneNode and add it to the scene, after you start up it, your mouse cursor will get "stuck" at the one point and you can't "rip off" it to terminate by pushing the cross button at the upper right corner. It can be obtained by other way, e.g. by catching an event from a keyboard and then closeDevice(). But how to do by such way?
Re: How to terminate the device by just pushing cross button
Not that trivial really. The problem is simply that you are in a mode where you want the mouse to be locked to the window. So if you don't want that anymore you have to get out of that mode.
Most games use the ESC key to switch out from the cursorless playing mode back to some kind of menu mode.
We also that in example 09 when you switch to first person camera view in menu. To get out you have to press ESC.
Most games use the ESC key to switch out from the cursorless playing mode back to some kind of menu mode.
We also that in example 09 when you switch to first person camera view in menu. To get out you have to press ESC.
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
Re: How to terminate the device by just pushing cross button
Thanks. I`ll look at the tutorial 09.