Game Development Community

Two GUI issues in iTorque 2D 1.4

by taomee · in Torque Game Builder · 07/07/2010 (10:00 pm) · 1 replies

Two issues in iTorque 2D 1.4 GUI Builder :
1. GuiBitmapCtrl can not select bitmap file via "Selection Button". The OK button is disable.
2. GuiButtonCtrl and GuiTextEditCtrl are black after game started.

About the author

Recent Threads


#1
06/10/2011 (9:27 pm)
This same issue happens in TGB 1.7.5 I think this is a Mac possibly only a Snow Leopard bug? I noticed that the usage of [NSOpenPanel setAllowedFileTypes:] changed in 1.6 and this new behavior may be the cause of the issue? This is a BAD bug REALLY annoying especially if you're just getting started and needs to be fixed in the next release asap.

Here is a quick fix:
Open up the TGB xcode project and open up guiInspectorTypes.cc

Find the "GuiInspectorTypeFileName::constructEditControl()" function

Change this code:
dSprintf( szBuffer, 512, "getLoadFilename(\"*.*\", \"%d.apply\", \"%s\");",getId(), getData());

To this code:
dSprintf( szBuffer, 512, "getLoadFilename(\"*.png;*.jpg;*.bmp;*.*\", \"%d.apply\", \"%s\");",getId(), getData());

Compile that and you should be good to go. Worked for me anyway. The problem is that the wildcard *.* is no longer working so we have to just go ahead and add the actual file types. I'm not sure if the browse control is used anywhere else in the GUI Builder but if there are any other file types that it needs to use they can just be added to the filter list