Trapping MouseMove Events to Specific GUIControl
by GrantleyDay · in Torque X 2D · 09/19/2007 (1:40 am) · 3 replies
I am having trouble trapping MouseMove events to a specific GUIControl, trying both GUIButton and GUIBitmap, incase one does work.
For example:
GUIBitmap test = new GUIBitmap();
//setup test (Bitmap, Position, Size, Visible, Folder, Active etc
then:
test.InputMap.BindAction(mouseID, (int)XMouseDevice.MouseObjects.X, TrapMouseMove);
So it works very weird. Bascially it doesn't recieve input, unless you pass focus to the control, and then it recieves input from anywhere in the Scene, all input is directed to TrapMouseMove.
This doesn't seem right, shouldn't the InputMap only trap the MouseMove events when the mouse is actually within the control?
Am I doing something wrong?
Thanks in advance!
For example:
GUIBitmap test = new GUIBitmap();
//setup test (Bitmap, Position, Size, Visible, Folder, Active etc
then:
test.InputMap.BindAction(mouseID, (int)XMouseDevice.MouseObjects.X, TrapMouseMove);
So it works very weird. Bascially it doesn't recieve input, unless you pass focus to the control, and then it recieves input from anywhere in the Scene, all input is directed to TrapMouseMove.
This doesn't seem right, shouldn't the InputMap only trap the MouseMove events when the mouse is actually within the control?
Am I doing something wrong?
Thanks in advance!
About the author
Torque Owner Thomas Buscaglia