I see, thank you paul. So if I want to judge which botton is pressed, I should use ea->getButton(). But what's ea->getButtonMask() use for? On Mon, May 25, 2009 at 7:45 PM, Paul Martz <[email protected]> wrote:
> You seem to be confusing the incoming button parameter, which is an > unsigned > int, with the GUIEventAdapter MouseButtonMask, which is a completely > different type. > > The code you quoted from EventQueue.cpp is from the function > mouseButtonPress. Take a look at the code comments in the EventQueue > header: > > /** Method for adapting mouse button pressed events, placing this > event on the back of the event queue, with specified time. > * Button numbering is 1 for left mouse button, 2 for middle, 3 for > right. */ > void mouseButtonPress(float x, float y, unsigned int button, double > time); > > Paul Martz > Skew Matrix Software LLC > http://www.skew-matrix.com > +1 303 859 9466 > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- Cheers, Yun
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

