Whats getLoadFileName() do?
by Sean H. · in Torque Game Engine · 02/03/2006 (9:55 am) · 3 replies
Whats getLoadFileName() do? I ran across this function last night and I can't find it any of my engine references. could someone explain to me what the function returns and how to use it. Thanks!
#2
looks like it opens a file list dialog and then calls the supplied callback when a file is selected.
02/03/2006 (11:43 am)
It's in .../common/ui/LoadFileDlg.guilooks like it opens a file list dialog and then calls the supplied callback when a file is selected.
//------------------------------------------------------------------------------
// ex: getLoadFilename("stuff\*.*", loadStuff);
// -- calls 'loadStuff(%filename)' on dblclick or ok
//------------------------------------------------------------------------------
function getLoadFilename(%filespec, %callback)
{
$loadFileCommand = "if(loadFileList.getSelectedId() >= 0)" @ %callback @ "(loadFileList.getValue());";
Canvas.pushDialog(LoadFileDlg, 99);
fillFileList(%filespec, loadFileList);
}
#3
02/03/2006 (11:50 am)
Thanks treb and orion!
Torque Owner Dracola