Custom GUI Buttons
by Howard Dortch · in Torque Game Engine · 05/18/2004 (4:47 am) · 6 replies
I looked at the Devgame and liked how they used a custom bitmap(png) for all the buttons. In the mainMenuGui there is a GBbitmapButtonCtrl that I assume allows me to use a graphic instead of the stock gui button. In my program when I edit the gui I dont see this as an option.
In short I want to use my graphics for the buttons, any info on how to do this? I already got the guicontrols.zip and a couple others and they all seem to do it a different way. Is this a hack or is there a "right" way ?
In short I want to use my graphics for the buttons, any info on how to do this? I already got the guicontrols.zip and a couple others and they all seem to do it a different way. Is this a hack or is there a "right" way ?
#2
GBbitmapButtonCtrl is defined in the devgame and I can see it when I try to create a new item but I dont see any reference to it in any other example.
I use the GuiBitmapButtonCtrl but can't get it to load a graphic. I can get GuiBitmapCtrl to load a graphic but it wont act as a button.
05/18/2004 (5:24 am)
GBbitmapButtonCtrl not GuiBitmapButtonCtrl GBbitmapButtonCtrl is defined in the devgame and I can see it when I try to create a new item but I dont see any reference to it in any other example.
I use the GuiBitmapButtonCtrl but can't get it to load a graphic. I can get GuiBitmapCtrl to load a graphic but it wont act as a button.
#3
You need to create a series of images for each button state.
For example button_quit:
button_quit_n.jpg
button_quit_h.jpg
button_quit_d.jpg
In the bitmap field for the control you simply put the base name: "button_quit" with no extension.
05/18/2004 (8:10 am)
You want to use GuiBitmapButtonControl.You need to create a series of images for each button state.
For example button_quit:
button_quit_n.jpg
button_quit_h.jpg
button_quit_d.jpg
In the bitmap field for the control you simply put the base name: "button_quit" with no extension.
#4
05/18/2004 (10:21 am)
As if by magic! Thank you!
#6
07/16/2004 (10:43 am)
Nice info.. but where do i have to copy my images for that to work?..
Torque Owner John Vanderbeck
VanderGames