IGUIFileSaveDialog

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
Post Reply
BishiNightBird
Posts: 7
Joined: Tue Mar 07, 2006 10:36 pm

IGUIFileSaveDialog

Post by BishiNightBird »

Ok, I'm not sure if this is the correct place to do this, but I think this is... anyways..

Ok, so my current project required a save as dialog box. After much messing around, I finally gave up on how I was doing it, and instead opted to implement it in engine(which ended up being much easier). I made it so it displayed the folders first, then a filtered list(by modifying the extension filter, you can make it so it only displays files of a certain type. Other types should be added, but haven't yet.) It also puts the name in an edit box when you click on a name, and auto closes when you double click a name.

Also, I modified the IGUIFileOpenDialog to support the file ordering and filtering, and also to auto accept on a double click of a file.

Now, I haven't tested this stuff under linux, however since I largely copied and pasted the OpenDialog, it should make the transition rather easily.

Also, it triggers the same events as the open file dialog box(ie EGET_FILE_SELECTED and EGET_FILE_CHOOSE_DIALOG_CANCELLED). I did this partially because I'm lazy, but also because the events are named in such a way that it makes sense that they could apply to this as well.

Now for a picture of it in action(note, the title is customizable just like the open file dialog box, I just don't happen to have set it as anything. Also, it's filtering out quite a number of files and only displaying files of type .txt. The bottom element is an edit box that allows you to type in the file you want to save as.
Image

This file contains the CGUIFileSaveDialog definitions(along with the interface), along with the modified CGUIFileOpenDialog, and the CGUIEnvironment that allows you to create it. CGUIFileSaveDialog.zip

So, what do you think?
Halan
Posts: 447
Joined: Tue Oct 04, 2005 8:17 pm
Location: Germany, Freak City
Contact:

Post by Halan »

isnt there one implented in irrlicht :roll:
BishiNightBird
Posts: 7
Joined: Tue Mar 07, 2006 10:36 pm

Kinda

Post by BishiNightBird »

Irrlicht has a File Open dialog box. Thats largely what the save dialog is based off of, however it doesn't have a File Save dialog box(or at least I can't find one), so I ended up making one myself.
jdoyle1983
Posts: 5
Joined: Thu Mar 09, 2006 10:03 am

Post by jdoyle1983 »

Just checked out you save dialog, very nice. Was just about to implement something similar myself.

Thanx!
<PLACE WITTY COMMENT HERE>
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

May I see some code for this?

I intended to write one of these for Guice but I really don't have time for everything care to help out in that department?
xhrit
Posts: 140
Joined: Mon Jun 14, 2004 8:54 am
Location: earth
Contact:

Post by xhrit »

Midnight wrote:May I see some code for this?
You are hopeless midnight. There is a link to a zip file with the all sources, right in the post.
Core2Duo E8400 3.0ghz - 2048mb DDR2 800 - geForce 9600 - Slackware12.1

Word-image-symbol programming limits, controls, and imprisons the individual.
Smash the control images, smash the control machine.
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

heh so there is...

I knew I saw that before I just passed over it this time having already read the bulk of the text before.

hey even gods make mistakes your the perfect example.
arokh
Posts: 9
Joined: Tue Oct 18, 2005 9:23 pm
Location: Germany

Post by arokh »

Hey BishiNightBird,

just wanna say thanks for your save file dialog. Just incuded it into our project. It was exactly what we needed. They should include this into the official Irrlicht release.

keep on the good work :-)
TheGameMaker
Posts: 275
Joined: Fri May 12, 2006 6:37 pm
Location: Germany

Post by TheGameMaker »

I think, i have to recompile irrlicht for using this??
nomad
Posts: 53
Joined: Thu Jan 05, 2006 12:35 pm
Location: Wales

Post by nomad »

IGUIFileSaveDialog (and the modified IGUIFileOpenDialog) are exactly what I am looking for, but the link is broken :(
Any chance you could make this available again?
MolokoTheMole
Posts: 109
Joined: Tue Jan 09, 2007 1:18 pm

Post by MolokoTheMole »

The link is broken.
Can anyone repost it again, or where can I find something similar.
I would really appreciate it.
Post Reply