Hi, everybody
In the GUIEventAdapter.h, we can see
enum MouseButtonMask {
LEFT_MOUSE_BUTTON = 1<<0,
MIDDLE_MOUSE_BUTTON = 1<<1,
RIGHT_MOUSE_BUTTON = 1<<2
};
so right key's value is 4.
and we can easily get num = 4 from
int num = osgGA::GUIEventAdapter::RIGHT_MOUSE_BUTTON;
But why in the EventQueue.cpp file,
when we judge which botton is pressed for example,
we use
switch(button)
{
case(1):
event->setButton(GUIEventAdapter::LEFT_MOUSE_BUTTON);
break;
case(2):
event->setButton(GUIEventAdapter::MIDDLE_MOUSE_BUTTON);
break;
case(3):
event->setButton(GUIEventAdapter::RIGHT_MOUSE_BUTTON);
break;
}
It means RIGHT_MOUSE_BUTTON value is 3??
Cheers,
Lingyun
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=12922#12922
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org