Gui Mouse Events
by Dave Strock · in Torque Game Engine · 07/30/2002 (10:44 pm) · 0 replies
I have a bunch of GuiBitmapCtrls (for which I made the mouse events changes a while ago) in one of my gui's, and I finally got around to writting the event handling code. The problem is, no matter which GuiBitmapCtrl I click on, it seems the event is generated for the first one. My function looks something like this:
// is just the number of the control
function CtrlName::onMouseDown(%this, %obj)
{
// some misc. code here...
generalMouseDownFunction(%this, %obj, "");
}
The problem is that if I echo the number in generalMouseDownFunction, it always comes out as 0, no matter which control was clicked on. Any ideas what I'm doing wrong?
//
function CtrlName
{
// some misc. code here...
generalMouseDownFunction(%this, %obj, "
}
The problem is that if I echo the number in generalMouseDownFunction, it always comes out as 0, no matter which control was clicked on. Any ideas what I'm doing wrong?