File Explorer
by Santosh Pillai · in Technical Issues · 06/10/2008 (11:42 pm) · 9 replies
Hi,
Is there any way to implement file explorer system in TGE?..It should work similar to windows file explorer
where the user can browse through any directory,folder and files to get the required file.
Is there any way to implement file explorer system in TGE?..It should work similar to windows file explorer
where the user can browse through any directory,folder and files to get the required file.
#2
06/11/2008 (2:30 am)
You can always mod the code from the world builder. It has a primitive explorer, and would allow for cross-platform support rather than hooking into the native api's for each OS.
#3
06/11/2008 (5:13 am)
If you're working with TGEA, the stuff you're propably looking for is OpenFileDialog and OpenFolderDialog.$foo = new OpenFileDialog(); //set some properties of $foo $foo.execute(); $selectedFile = $foo.fileName;
#4
Unfortunately, the selection is restricted to stuff in the game directory, so it would not work for selecting arbitrary files. Native dialog support is only available with TGEA. If you have both engines and want to use TGE, you could just backport the relevant code (should be trivial). Otherwise, you would have to roll your own thing.
06/11/2008 (5:28 am)
In TGE, one way for file selection is getLoadFilename and getSaveFilename. Don't know of a ready-made directory selection dialog in TGE.Unfortunately, the selection is restricted to stuff in the game directory, so it would not work for selecting arbitrary files. Native dialog support is only available with TGEA. If you have both engines and want to use TGE, you could just backport the relevant code (should be trivial). Otherwise, you would have to roll your own thing.
function foo( %fileName )
{
echo( "Selected file name is: " TAB %fileName );
}
getLoadFilename( "*.*", foo );
#5
I am using TGE ..is there any way to implement file explorer in it.Any inbuild functions?
06/11/2008 (5:38 am)
Hi,I am using TGE ..is there any way to implement file explorer in it.Any inbuild functions?
#6
06/11/2008 (6:11 am)
There's GuiDirectoryFileListCtrl and GuiDirectoryTreeCtrl. Unfortunately, AFAIK both are restricted to the game directory. However, at least in the case of GuiDirectoryFileListCtrl the change to the engine code to remove that restriction is trivial.
#8
06/17/2008 (12:25 am)
Except in my first post, I had been talking about TGE.
#9
10/22/2009 (2:56 pm)
Hi, did you find a way to access or explore directories outside the engine directory in TGE?
Torque Owner Nathan Allen
Default Studio Name