Game Development Community

Creating a GUI in iTGB

by Richard Skala · in iTorque 2D · 01/09/2010 (2:06 am) · 4 replies

Is there a tutorial or any information somewhere that describes how to use the TGB GUI Editor? In addition, are there directions anywhere that describe how to get it to work using iTGB? The documentation on the GUI Editor is shockingly sparse and out of date. At this point, I'm really not sure where to begin.

Thanks for any assistance.

#1
01/09/2010 (6:25 am)
What kind of a GUI? You just open the gui palette of controls :

img693.imageshack.us/img693/4395/screenshot122l.png
Although, you can use staticSprites , animated sprites and other sceneObjects as they recieve mouse input (touch input) automatically... These are probably more optimised than the GUI controls at this point.

#2
01/09/2010 (8:23 am)
Thanks. I was planning on building a basic front end for now.

But, using the GUI Editor on Mac OS X, I seem to be having a more bizarre issue:

If I go to the 'General' tab on a 'GuiBitmapButtonCtrl' or a 'GuiBitmapButtonTextCtrl' and try to set the 'Bitmap' by pressing the "..." button, ALL image files are grayed out and cannot be selected, regardless of the type (jpg, bmp, png, etc).

However, I thought I was doing something wrong, but if I type an entire path to the image file in the 'Bitmap' field, the image works fine. Does anyone else have this problem in the Mac version of the GUI Editor?
#3
01/09/2010 (8:59 am)
Yes, I have seen that issue, and I think Mich also hit upon that and tried to figure it out. What's strange is that if you manually create a reference to the image in a .cs file for a GUI component, it then works just fine to select via those! Seems it needs a warm-up.

Make GUIs, type in the correct path, see if you now can change it via the GUI editor.
#4
01/09/2010 (4:12 pm)
No, I still can't select an image file at all from the Bitmap select menu, no matter how many Gui items I create, with or without typing in the file paths. I'm currently using TGB for Mac v1.7.4 and iTGB v1.2.

For others using TGB for Mac and have this issue, this will make the process less painful:
- Locate the desired image in a Finder window.
- Open a Terminal window (located in /Applications/Utilities).
- Drag the image file into the Terminal window.
- The full file path will print out in the Terminal window, and you can copy-paste it from there.

(If someone knows a better way to do this, please post it here.)