How to simulate "Save as..." using irrlicht?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
wsw1231
Posts: 148
Joined: Fri Oct 01, 2010 7:55 am

How to simulate "Save as..." using irrlicht?

Post by wsw1231 »

I would like to add "Save as..." in the menu item for the user to save his current work to a specific file directory.

I know how to load a file using

Code: Select all

guienv->addFileOpenDialog(...)
but I think the above API cannot be applied to the "Save as..." case.

Could anyone give me some suggestions?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

There are save dialogs available from the forum, and I hope that we will get one in the engine soon.
wsw1231
Posts: 148
Joined: Fri Oct 01, 2010 7:55 am

Post by wsw1231 »

hybrid wrote:There are save dialogs available from the forum, and I hope that we will get one in the engine soon.
Oh....do you mean the current version of irrlicht engine has not had this API yet?

What should I do now?
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Post by REDDemon »

youcan create that function manually. just create a text box in wich enter the name of your file and use the string in the text box as file name. a good thing is also to check for wrong characters (for example you may not want a file name with a "\" inside it.)
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
wsw1231
Posts: 148
Joined: Fri Oct 01, 2010 7:55 am

Post by wsw1231 »

REDDemon wrote:youcan create that function manually. just create a text box in wich enter the name of your file and use the string in the text box as file name. a good thing is also to check for wrong characters (for example you may not want a file name with a "" inside it.)
How can I handle the case in which the user wants to save the file to other directory?
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Start with the code from the file load dialog, turn it into a save dialog.

I should add this soon, it's been on my todo list for ages. Thanks for reminding me Hybrid :)
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
wsw1231
Posts: 148
Joined: Fri Oct 01, 2010 7:55 am

Post by wsw1231 »

bitplane wrote:Start with the code from the file load dialog, turn it into a save dialog.

I should add this soon, it's been on my todo list for ages. Thanks for reminding me Hybrid :)
I am looking forward to this API.
Oh..I think it's quite urgent since my final year project in the university has to be submitted in March :(
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Then either do what REDDemon said, or alter the loader dialog to also support saving.
Post Reply