Buttons in TGEA
by Barry Gallagher · in Torque Game Engine Advanced · 08/10/2007 (2:58 pm) · 9 replies
Im trying to port over highlightable buttons from TGE to TGEA.
It doesnt seem to work.
If I add a normal button that doesnt highlight it works fine but If I try to set it up for highlighting by making a "button_n" version and a "button_h" version but it doesnt seem to work at all.
Anybody got any suggestions or workarounds.
It doesnt seem to work.
If I add a normal button that doesnt highlight it works fine but If I try to set it up for highlighting by making a "button_n" version and a "button_h" version but it doesnt seem to work at all.
Anybody got any suggestions or workarounds.
About the author
#2
08/11/2007 (7:14 am)
It has worked for me without any modification to the engine...The feature of 4-stage bitmap buttons is built in and should work just fine. Make sure you don't include the "_n/h/d/i" part or the extension (.png etc...) in the bitmap field of the control and you should be good to go.
#3
Seemingly you have to use the highlightable version now.
It doesnt seem to allow non hightlightable buttons anymore? ..it stays blank
Also it didnt seem to work for every type of bitmap button.
The only one I got working was GuiBitmapButtonCtrl.
It was all very confusing.
Like the exact same button setup as a GuiBitmapCtrl didnt work....
08/11/2007 (7:52 am)
Yeah.. i got it working there an hour ago jacob. Seemingly you have to use the highlightable version now.
It doesnt seem to allow non hightlightable buttons anymore? ..it stays blank
Also it didnt seem to work for every type of bitmap button.
The only one I got working was GuiBitmapButtonCtrl.
It was all very confusing.
Like the exact same button setup as a GuiBitmapCtrl didnt work....
#4
That would be the easy way, otherwise you would need to make changes to the engine.
And yes, the 4-state button effect only works for children of the guiButtonBaseCtrl such as the button/bitmap button, check box, radio box and bitmap button text control.
08/11/2007 (8:44 am)
If you don't want the button to highlight when you mouse over, you could duplicate your button_n and call it button_h - if that's what you are referring to :)That would be the easy way, otherwise you would need to make changes to the engine.
And yes, the 4-state button effect only works for children of the guiButtonBaseCtrl such as the button/bitmap button, check box, radio box and bitmap button text control.
#5
Basically my first presumption was all bitmap buttons in general were not working as I thought if any buttons were going to work it would be the non highlightable ones. I actually want Highlightable buttons but I know TGEA aint exactly 100% yet so I tried the simplist bitmap button I could think of.
Terribly confusing to myself. Anyway thanks for the responses. I lucked out abit on getting it to work through trial and error. Otherwise I would still be muttering at the screen.
08/11/2007 (8:56 am)
Yeah I figured that out too Jacob. Its a bit like going a-c-b when all you want is a-b though.Basically my first presumption was all bitmap buttons in general were not working as I thought if any buttons were going to work it would be the non highlightable ones. I actually want Highlightable buttons but I know TGEA aint exactly 100% yet so I tried the simplist bitmap button I could think of.
Terribly confusing to myself. Anyway thanks for the responses. I lucked out abit on getting it to work through trial and error. Otherwise I would still be muttering at the screen.
#6
There are some areas that TGEA is still being updated/perfected on but in the GUI controls department, it is up to date with the latest TGE - just FYI. So, GUI controls that work in TGE should work the same in TGEA at this point. (Some internal things engine side have changed because of the the GFX system but they work the same)
08/11/2007 (9:16 am)
Glad to help.There are some areas that TGEA is still being updated/perfected on but in the GUI controls department, it is up to date with the latest TGE - just FYI. So, GUI controls that work in TGE should work the same in TGEA at this point. (Some internal things engine side have changed because of the the GFX system but they work the same)
#7
Another thing that didnt seem to work (havent checked since the update) was invisibility tracks.
It seems to only allow values 0% and 100% with no inbetween whereas in TGE it has all the values in between.
08/11/2007 (9:36 am)
Well I tried setting up buttons as non highlightable and it didnt work. So its not that up to date.Another thing that didnt seem to work (havent checked since the update) was invisibility tracks.
It seems to only allow values 0% and 100% with no inbetween whereas in TGE it has all the values in between.
#8
08/11/2007 (10:02 am)
I suppose I haven't tried out "all" of the features of TGEA's GUI controls and compared them to the latest TGE - so you may be right that it's not all up to date :)
#9
I started a thread here: www.garagegames.com/mg/forums/result.thread.php?qt=69618 which is about a problem I am having porting something from TGE to TGEA.
What is wrong is that there are two buttons on the screen. One is a static object created from: new GuiControl(MainMenuDlg)
The other is a highlightable button created by: new GuiControl(OverlayDlg)
In both buttons, there is a field assigned like: bitmap = "./arrows/exit";
In the case of exit, there is an exit_h.jpg, an exit_n.jpg, and two alphas exit_h.alpha.jpg and exit_n.alpha.jpg. The mainmenu item has a .alpha.jpg file, too.
Neither one uses the alpha. The highlighting on the exit button works, but without the alpha the graphic is ugly. The alpha works fine with the same project in TGE 1.5.2, so it has to be something that was changed.
If it is a material definition, how do I change the button to recognize an alpha texture? Or, how do I specify a material for the button texture?
<* Wes *>
EDIT: I found that a .PNG file with transparency does work. So it appears that the .alpha part of the filename is ignored.
11/26/2007 (1:17 pm)
I know this thread is old, but it has some relevancy.I started a thread here: www.garagegames.com/mg/forums/result.thread.php?qt=69618 which is about a problem I am having porting something from TGE to TGEA.
What is wrong is that there are two buttons on the screen. One is a static object created from: new GuiControl(MainMenuDlg)
The other is a highlightable button created by: new GuiControl(OverlayDlg)
In both buttons, there is a field assigned like: bitmap = "./arrows/exit";
In the case of exit, there is an exit_h.jpg, an exit_n.jpg, and two alphas exit_h.alpha.jpg and exit_n.alpha.jpg. The mainmenu item has a .alpha.jpg file, too.
Neither one uses the alpha. The highlighting on the exit button works, but without the alpha the graphic is ugly. The alpha works fine with the same project in TGE 1.5.2, so it has to be something that was changed.
If it is a material definition, how do I change the button to recognize an alpha texture? Or, how do I specify a material for the button texture?
<* Wes *>
EDIT: I found that a .PNG file with transparency does work. So it appears that the .alpha part of the filename is ignored.
Torque Owner Barry Gallagher
Help!