How to close the window
-
daniel_jianfeng
- Posts: 12
- Joined: Sun Mar 31, 2013 12:43 pm
How to close the window
In my own project, I used the irrlicht.But now I want to close the window by code not by mouse or by keyboard. Is there a method available?
Re: How to clost the window
You have to call
This can be called from any place. This will force one of the next "device->run()" to return false.
Code: Select all
device->closeDevice();-
hybrid
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: How to close the window
Next time, please simply edit your own post (use the edit button) and post in Beginner's section right away.
-
daniel_jianfeng
- Posts: 12
- Joined: Sun Mar 31, 2013 12:43 pm
Re: How to close the window
Thank you, hybrid. I get it.
-
daniel_jianfeng
- Posts: 12
- Joined: Sun Mar 31, 2013 12:43 pm
Re: How to close the window
My project is a little special, there is no loop in my code. So the method closeDevice is not suitable in this case. Do you have any other solution, greenya.
Code: Select all
while(device->run()){}
device->closeDevice();Re: How to close the window
I really suggest you to learn some c++ programming and learn from the examples which are provided with Irrlicht SDK. Because you ask stuff which is already there. If you have problems understanding the examples, then you need to get some knowledge about c++ in general, types, variables and code execution flow.
For example the 09.Meshviewer has a menu and when you click File->Exit, the application closes, and the code just executes closeDevice() method. That is your case.
For example the 09.Meshviewer has a menu and when you click File->Exit, the application closes, and the code just executes closeDevice() method. That is your case.