Hi.
Again, little details make the difference.
When you need to quickly develop a prototype application, you don't want wasting your time coding some boring missing features ...
I know it's possible to create a GUIFileSaveDialog with GUIWindow and co, but this would be easier and faster if there was alaready a default GUIFileSaveDialog into the engine.
I'm going to make it and release the code with the hope this will be useful and added to the engine.
That's why I need some advices from experts and developers.
To me, there are two way to go :
1) adding a parameter to GUIFileOpenDialog to make the IGUIElement* FileNameText; optionnaly editable. (this would go with this patch here : http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=24823 )
2) create a separate GUIFileSaveDialog gui element and add it to the engine
What do you think ?
adding GUIFileSaveDialog : how ?
-
- Posts: 44
- Joined: Thu Sep 28, 2006 2:27 pm
- Location: Europe
adding GUIFileSaveDialog : how ?
Last edited by hey_i_am_real on Sun Nov 18, 2007 3:09 pm, edited 1 time in total.
I like working with rank-outsiders, as long as they give themselves the means to achieve their ambitions.
-
- Posts: 44
- Joined: Thu Sep 28, 2006 2:27 pm
- Location: Europe
I did start this a while back, but I lost the code in a hard drive crash
I just changed the file open dialog and added some extra methods and elements, I didn't finish it though, I wanted a nice combo box of filters, and to have the file name as an editable combo box (for autocomplete).
I was just going to rename the interface from IGUIFileOpenDialog to IGUIFileDialog, and add a couple of methods to tell the difference between a load and a save dialog.
Feel free to have a go at doing this, even if it's just the open dialog with an editable text box for now, it will give us a nice starting point.
imo the IFileSystem interface could also do with some changes, there's no concept of volumes or read-only folders- you can't cd into a zip file, or easily change drive in windows.. but that's another discussion entirely!
I just changed the file open dialog and added some extra methods and elements, I didn't finish it though, I wanted a nice combo box of filters, and to have the file name as an editable combo box (for autocomplete).
I was just going to rename the interface from IGUIFileOpenDialog to IGUIFileDialog, and add a couple of methods to tell the difference between a load and a save dialog.
Feel free to have a go at doing this, even if it's just the open dialog with an editable text box for now, it will give us a nice starting point.
imo the IFileSystem interface could also do with some changes, there's no concept of volumes or read-only folders- you can't cd into a zip file, or easily change drive in windows.. but that's another discussion entirely!
-
- Posts: 44
- Joined: Thu Sep 28, 2006 2:27 pm
- Location: Europe
Ok. Thank you for this information Bitplane. :-)
I'll go on your path and will directly modify IGUIFileOpenDialog.
As I'm not planning to study the guts and bowels of Irrlicht, I will only make minor modifications.
I'll go on your path and will directly modify IGUIFileOpenDialog.
As I'm not planning to study the guts and bowels of Irrlicht, I will only make minor modifications.
I like working with rank-outsiders, as long as they give themselves the means to achieve their ambitions.
-
- Posts: 44
- Joined: Thu Sep 28, 2006 2:27 pm
- Location: Europe
Hi.
I've just posted the patch into the patch tracker on sourceforge.
Here is a description of the patch :
- the dialog size is not updated on font change
I've just posted the patch into the patch tracker on sourceforge.
Here is a description of the patch :
BTW, I forgot to mention :This patch makes possible :
- to use the GUIFileOpenDialog to save a file.
- to see the end of a long directory name in the upper textbox.
This patch does :
- change the upper StaticText box into a disabled EditBox and rename it DirectoryText.
- add an EditBox at the bottom of the dialog, where the user can manualy specify and modify the filename, and name it FilenameText.
- add the method GUIFileOpenDialog::setFileName() to allow the user to set the content of the FilenameText box.
Files modified by this patch :
- CGUIFileOpenDialog.cpp
- CGUIFileOpenDialog.h
- IGUIFileOpenDialog.h
Detailed explanations :
- when the user select a file into the filelist, the path to this file is stored into the DirectoryText box, and the filename is stored into the FilenameText box.
- when the user clicks the OK button, the full file name is concatenated this way :
FileName = DirectoryText->getText();
FileName+= L"/";
FileName+= FilenameText->getText();
Notes :
- Tested on Linux only.
- It's not really required to rename GUIFileOpenDialog into GUIFileDialog as we could consider that we want to Open a Dialog to select a File ...
YG2F
- the dialog size is not updated on font change
I like working with rank-outsiders, as long as they give themselves the means to achieve their ambitions.