Game Development Community

OnRightMouseUp in 1.4.2

by Steve Lamperti · in Torque Game Engine · 09/11/2006 (5:33 pm) · 3 replies

I had some code in my project, that reproduced the right mouse behavior that you see in the editor in the main window. This is the free mouse look while the right mouse button is held down. After updating to 1.4.2, I am not getting the onRightMouseUp message any more. This was where I restored the mouse cursor, so now when I click on the right mouse button the free look begins, but it doesn't end when I release the button.

Does anyone know if there are changes in the 1.4.2 that may be related to this change in the bahavior? I seem to be getting the right mouse up message if I don't turn the cursor into the free look mode, but when I change the mode, I don't get the message.

If anyone has any suggestions, I would appreciate hearing them.

Thanks,

#1
01/21/2009 (5:31 am)
Did you ever get this working since it's still a problem in TGE 1.5.x
#2
01/21/2009 (9:22 am)
@James,

I did get this working, but this was quite a long time ago, and I am not sure exactly what code was the fix for this problem. Here's some code that I added to GuiCanvas::processInputEvent, but I am not sure if it's the right fix or the whole fix. feel free to play with this code, and see if it helps, but like I say, not sure.

else if(event->deviceType == MouseDeviceType && cursorON == false && event->objType == SI_BUTTON && event->objInst == KEY_BUTTON1 && event->action == SI_BREAK)
   		{
   		// JSL - Process right mouse up even when cursor is off 
      	//copy the modifier into the new event
      	mLastEvent.modifier = event->modifier;
      
       	//copy the cursor point into the event
       	mLastEvent.mousePoint.x = S32(cursorPt.x);
       	mLastEvent.mousePoint.y = S32(cursorPt.y);

        mNextMouseTime = 0xFFFFFFFF;
        rootRightMouseUp(mLastEvent);
		}
#3
01/25/2009 (10:38 pm)
Ah great... That worked perfectly! :)