Re: [osg-users] what's the value of RIGHT_MOUSE_BUTTON?

2009-05-26 Thread Lingyun Yu
I got it, thank you all! On Mon, May 25, 2009 at 11:53 PM, Chris 'Xenon' Hanson wrote: > Lingyun Yu wrote: > > 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? > > A mask value like that is usually u

Re: [osg-users] what's the value of RIGHT_MOUSE_BUTTON?

2009-05-25 Thread Chris 'Xenon' Hanson
Lingyun Yu wrote: > 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? A mask value like that is usually used so it can indicate that multiple buttons are pressed simultaneously. The bits in the mask don'

Re: [osg-users] what's the value of RIGHT_MOUSE_BUTTON?

2009-05-25 Thread Lingyun Yu
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 wrote: > You seem to be confusing the incoming button parameter, which is an > unsigned > int, with the GUIEventA

Re: [osg-users] what's the value of RIGHT_MOUSE_BUTTON?

2009-05-25 Thread Paul Martz
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

[osg-users] what's the value of RIGHT_MOUSE_BUTTON?

2009-05-25 Thread Lingyun Yu
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::G