GUI buttons broken? Or, Level Control why have you forsaken me?
by Richard Foge · in Torque Game Builder · 04/09/2006 (1:53 am) · 2 replies
Just picked up TGB, was working through a few of the tutorials and i've gotten hung up on a GUI button issue.
When I set up a new GUI with buttons in the editor and then hit F10 to exit the editor with that GUI file open the buttons are clickable and seem to work as planned.
After saving that GUI, making sure that it's loaded in the context of a 'game', and then using the 'canvas.pushDialog(NameOfGUI);' call in the scripts - the GUI shows up and looks exactly like it should, but none of the buttons are clickable.
I've tried this a couple of times, (the GUI in the checkers tutorial, the quicky button demo, and a test GUI set up from scratch), and I haven't been able to figure out what I am doing wrong.
Anyone else out there run into this and find a way around it?
Thanks!
Crossposted at: Torque Art Public Area >> GUI Creation
When I set up a new GUI with buttons in the editor and then hit F10 to exit the editor with that GUI file open the buttons are clickable and seem to work as planned.
After saving that GUI, making sure that it's loaded in the context of a 'game', and then using the 'canvas.pushDialog(NameOfGUI);' call in the scripts - the GUI shows up and looks exactly like it should, but none of the buttons are clickable.
I've tried this a couple of times, (the GUI in the checkers tutorial, the quicky button demo, and a test GUI set up from scratch), and I haven't been able to figure out what I am doing wrong.
Anyone else out there run into this and find a way around it?
Thanks!
Crossposted at: Torque Art Public Area >> GUI Creation
#2
I think for whatever reason the Level Control widget up at the top is somehow hoarding my mouse input all to itself. I could be totally wrong of course, but it's what I suspect.
If you are having this problem as well I recommend running the game without the Level Builder and getting used to using the toggleLevelEditor(); command in the console :)
If any of the devs have a recommendation that will fix this problem properly that'd be great!
04/10/2006 (10:39 pm)
It appears that if I run the game without the Level Builder my GUIs work as expected. If I toggle to the editor and then run the game again the GUIs are busted again.I think for whatever reason the Level Control widget up at the top is somehow hoarding my mouse input all to itself. I could be totally wrong of course, but it's what I suspect.
If you are having this problem as well I recommend running the game without the Level Builder and getting used to using the toggleLevelEditor(); command in the console :)
If any of the devs have a recommendation that will fix this problem properly that'd be great!
Torque Owner Richard Foge
onMouseUp, onMouseDown, onMouseEnter, onMouseLeave, etc. with simple echo commands so that I could see what kind of mouse input I was getting.
When I run my game the output looks like this:
-----------------------------------------------------------
Mouse Enter!
called - startGame
called - initializeGame
called - setupT2DScene
---
a bunch of compiled script loads
---
pushing gui
Mouse Leave!
-----------------------------------------------------------
After a while I also see messages that say:
keyboard0 input device created.
mouse0 input device created.
These repeat after a while.
So, I guess what i'm wondering now is if i've somehow missed a step where I have to set the GUI as the main focus so that the mouse can be used on it? Any help would be appreciated.
Thanks!
EDIT: Bah, this appears to be a false lead.