HI Renan,

EventType does not map to mouse buttons so you misusing the
LEFT/RIGHT_MOUSE_BUTTON enum.  For button you just do ea.getButton(),
the event type of buttons are osgGA::GUIEventAdapter::RELEASE/PUSH.
Please do a search of examples and osgGA for usage.

Robert.

On Thu, Dec 11, 2008 at 7:19 PM, Renan Mendes <[email protected]> wrote:
> Hi,
>
>     I have a MacBook and I'm using OSG on Windows, installed with bootcamp.
> My application doesn't detect the right mouse button even though I am using
> a regular two-button mouse (Microsoft's). I was wondering if anyone stumbled
> upon anything of the kind and could tell me wether the problem is the
> running windows on bootcamp or not. Here's the code I'm using:
>
> (inside handle method)
> switch(ea.getEventType()) {
>
>         case(osgGA::GUIEventAdapter::RIGHT_MOUSE_BUTTON):
>             cout << "right button" << endl;
>             break;
>
>         case(osgGA::GUIEventAdapter::LEFT_MOUSE_BUTTON):
>             cout << "left button" << endl
>             break;
>
>         default:
>             break;
>
> }
>
>     Thanks a lot.
>
>              Renan M Z Mendes
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to