What's the secret to a clickable image?
by Marc Ilgen · in Torque Game Builder · 03/30/2005 (5:23 pm) · 4 replies
I'm trying to create a main screen with a clickable exit button on it. The background image itself has the text "Exit" on it, just like the space scroller demo. I don't want to see an actual GUI button over top, instead I just want to be able to have the user click the Exit text on the background image and have the game exit. This seems to work in the space scroller but I copied that very same GuiBitmapButtonCtrl text into my game and it now shows a gray GUI button covering my exit text.
So what is the secret to making this work?
So what is the secret to making this work?
#3
03/30/2005 (7:04 pm)
My MinApp tutorials also cover GUIs in great detail, but from the TGE perspective. Although I doubt they are much different.
#4
These 4 blank images are the ones John is refering to with the _h and _n naming style.
Have a closer look at the space shooter gui, you should be able to replicate that in your project. Its how I did the main menu gui for my pong game as well.
03/31/2005 (3:09 am)
Marc: I think the way the space shooter works is that the image for the gui button is set to a blank image. There are 4 blank images in the spaceshooter/images directory, for when the button is clicked/highlighted etc Make sure you have 4 blank images in your project as well.These 4 blank images are the ones John is refering to with the _h and _n naming style.
Have a closer look at the space shooter gui, you should be able to replicate that in your project. Its how I did the main menu gui for my pong game as well.
Torque Owner John Vanderbeck
VanderGames
Its something like myimage_n.jpg and then theres a whle set with like _h etc. Off the top of my head I can't recall the specifics and i'm at work but if you pull up the code its rather obvious.