RC3: bad save/load brushes dialog (fix posted)
by J. Alan Atherton · in Torque Game Builder · 06/17/2006 (11:25 am) · 4 replies
The save brushes dialog doesn't specify what extension brushes need, and doesn't add on the extension for you.
When I bring up the load brush dialog, it is set to show *.map filetypes, and there is no *.bru option in the combo box. I just checked the gui file, and this line:
If I go and manually rename the saved brushes file to have a .map extension, then all is good.
When I bring up the load brush dialog, it is set to show *.map filetypes, and there is no *.bru option in the combo box. I just checked the gui file, and this line:
tileScreenMenu.scriptCommand["Brush", 1] = "getLoadFilename(\"tileeditor/client/brushes/*.bru\", loadBrushes);";looks like it should work. So it must be elsewhere.
If I go and manually rename the saved brushes file to have a .map extension, then all is good.
#2
Change the line above and the one below it to:
Now it at least puts the correct path into the dialog, although it still has *.* for the filetype. Also, it does not show the files on display... you must click the filetype combo box, for example, to refresh the view and see any files in there.
06/17/2006 (11:37 am)
Ok, here's an improvement.Change the line above and the one below it to:
tileScreenMenu.scriptCommand["Brush", 1] = "getLoadFilename(\"tools/tileEditor/data/brushes/*.bru\", loadBrushes, $currentBrushDirectory);"; tileScreenMenu.scriptCommand["Brush", 2] = "getSaveFilename(\"tools/tileEditor/data/brushes/*.bru\", saveBrushes, $currentBrushDirectory);";
Now it at least puts the correct path into the dialog, although it still has *.* for the filetype. Also, it does not show the files on display... you must click the filetype combo box, for example, to refresh the view and see any files in there.
#3
Start TGB -> Open tile editor -> load brushes
The open file dialog file type is *.* which is enough for me to find and select my brushes.
Then load a tile layer. The open file dialog defaults to *.lyr file types.
Then load brushes again. The open file dialog remembers the *.lyr default file type, and there is no way to point to a .bru file. The only way I can get the open file dialog to look for *.* og *.bru is to restart TGB, open the tile editor and load brushes as the very first thing.
06/19/2006 (7:32 am)
Some more stranger load brush behaviour:Start TGB -> Open tile editor -> load brushes
The open file dialog file type is *.* which is enough for me to find and select my brushes.
Then load a tile layer. The open file dialog defaults to *.lyr file types.
Then load brushes again. The open file dialog remembers the *.lyr default file type, and there is no way to point to a .bru file. The only way I can get the open file dialog to look for *.* og *.bru is to restart TGB, open the tile editor and load brushes as the very first thing.
#4
Go to imageSelection.ed.cs, to line 470, and edit two lines there to look like this:
Now go to editorScreen.ed.cs, to about line 230. At the end of the else if statement, add this block
That fixes everything related to the load/save brush dialogs, as far as I can tell.
06/20/2006 (8:29 am)
Alright, I got this fixed 100% I believe.Go to imageSelection.ed.cs, to line 470, and edit two lines there to look like this:
// Load/Save Brushes. tileScreenMenu.scriptCommand["Brush", 1] = "TileMapEditor::loadFile(\"*.bru\", loadBrushes, $currentBrushDirectory);"; tileScreenMenu.scriptCommand["Brush", 2] = "TileMapEditor::saveFile(\"*.bru\", saveBrushes, $currentBrushDirectory);";Just be sure you get the lines that start with
tileScreenMenu.scriptCommand["Brush", 1]and
tileScreenMenu.scriptCommand["Brush", 2]
Now go to editorScreen.ed.cs, to about line 230. At the end of the else if statement, add this block
else if (%ext $= "*.bru")
{
%filter = %dialog.AddFilter("*.bru","TGB Tile Brush Files");
%filterList.setSelected ( %filter );
}That fixes everything related to the load/save brush dialogs, as far as I can tell.
Torque Owner J. Alan Atherton