Bitmap Buttons, Image Maps and Behaviors
by WesTT · in Torque Game Builder · 08/13/2008 (8:00 am) · 2 replies
Hi all. I am pretty n00barific with the GUI system in TGB at the moment so I am here with some questions regarding using some of the controls.
I am currently looking into the interface/frontend of our game and considering how to do elements such as the options screen, dead screen etc. At the moment I have 4 "buttons" in the titlescreen level file for starting a game, options, exit, credits and so forth. They have a few behaviors attached to enable them to "grow" or "shrink" when the mouse is over/not over as well. This all work pretty well as is, but I can see that this could quickly become messy/hard to manage with a lot of elements. I was looking into the GUI editor and while it is nice I have a few questions:
1.) Is it possible to use an image map with a GuiBitmapButtonCtrl? I know you can select an image file to use, but this uses the whole image map and does not allow you to select a frame. This makes reusing game images rather troubling if all your images are tiled.
2.) Is there anyway to attach behaviors to GUI controls?
Currently reading the docco on the TDN but any other helpful links are appreciated.
Regards
I am currently looking into the interface/frontend of our game and considering how to do elements such as the options screen, dead screen etc. At the moment I have 4 "buttons" in the titlescreen level file for starting a game, options, exit, credits and so forth. They have a few behaviors attached to enable them to "grow" or "shrink" when the mouse is over/not over as well. This all work pretty well as is, but I can see that this could quickly become messy/hard to manage with a lot of elements. I was looking into the GUI editor and while it is nice I have a few questions:
1.) Is it possible to use an image map with a GuiBitmapButtonCtrl? I know you can select an image file to use, but this uses the whole image map and does not allow you to select a frame. This makes reusing game images rather troubling if all your images are tiled.
2.) Is there anyway to attach behaviors to GUI controls?
Currently reading the docco on the TDN but any other helpful links are appreciated.
Regards
#2
08/13/2008 (8:28 pm)
Ahh, indeed. If I had actually looked at the hierarchy for GUI controls I would have seen that. Thanks James.
Associate James Ford
Sickhead Games
2. Nope. GuiControl is not derived from BehaviorComponent like t2dSceneObect is.