Can't use mouse buttons with cursor on? (tgea)
by Dean · in Torque Game Engine · 06/07/2007 (3:34 pm) · 5 replies
I'm setting up my key bindings in default.bind.cs, and I noticed that whenever I have the cursor on ( cursorOn(); ), none of my mouse keys do anything in the game (button0, button1, etc). I've switched the controls around and the functions work fine with the keyboard, or if I set a function to use a mouse button and turn the cursor off, the function works. It doesn't seem to matter what the function DOES... i'm guessing it just doesn't register the mouse clicks with the cursor on. any idea why?
#2
You're going to need access to the source code to alter the default behaviour of the mouse and GUI's, can't do it via script.
06/08/2007 (2:02 am)
You presumptions are spot on. You're going to need access to the source code to alter the default behaviour of the mouse and GUI's, can't do it via script.
#3
For some reason, I was getting in game input (turning, shooting, etc), but anything GUI or cursor related just didn't work right.
So both Dean and Tim are correct. To add input response with a cursor on, you have to modify the engine. I can't go into detail since this is a public forum, but I can tell you it's quite easy to get set up.
06/08/2007 (6:36 am)
I first came across this situation when I was implementing the P5 Glove Resource (which is a great resource for learning how to implement 3rd party SDKs and figuring out Torque input systems).For some reason, I was getting in game input (turning, shooting, etc), but anything GUI or cursor related just didn't work right.
So both Dean and Tim are correct. To add input response with a cursor on, you have to modify the engine. I can't go into detail since this is a public forum, but I can tell you it's quite easy to get set up.
#4
06/08/2007 (11:29 pm)
After sorting through code for a while, I figured it out. I added some code to the engine that lets both mouse movement and mouse clicks trigger the key bindings while the cursor is on. I also figured out how to show the cursor when you're in cursoroff mode, but i dont think i'll use it. woohoo :P
#5
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=13034
It's my first resource, so if you have time, I'd like some feedback :)
06/14/2007 (10:51 am)
I made a resource for this here:www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=13034
It's my first resource, so if you have time, I'd like some feedback :)
Torque Owner Dean