On 11/6/06, Stephan Maximilian Huber <[EMAIL PROTECTED]> wrote:
Sure!
Maybe I'm missing some important change in OSG 1.2 regarding event handling... btw code is long, here posting handle() function:
bool BoostManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us){
switch( ea.getEventType() ){
// ...
// other "cases"
// ...
case(GUIEventAdapter::SCROLL):{
addMouseEvent(ea);
osg::notify(ALWAYS) << "Scroll\n"; // This line is printed when I scroll, OK
if ( MouseListener() ) us.requestRedraw();
us.requestContinuousUpdate(true);
return true;
}
case(GUIEventAdapter::SCROLL_UP):{
addMouseEvent(ea);
osg::notify(ALWAYS) << "Scroll-up\n"; // NOT PRINTED!!!
if ( MouseListener() ) us.requestRedraw();
us.requestContinuousUpdate(true);
return true;
}
case(GUIEventAdapter::SCROLL_DOWN):{
addMouseEvent(ea);
osg::notify(ALWAYS) << "Scroll-down\n"; // NOT PRINTED!!!
if ( MouseListener() ) us.requestRedraw();
us.requestContinuousUpdate(true);
return true;
}
}
Note that even commenting GUIEventAdapter::SCROLL case, SCROLL_UP and SCROLL_DOWN are never captured.
My MouseListener() does not influence the osg::notify output, so I think cannot be responsable of event skipping.
Bruno Fanini schrieb:
> Hi all, OSGusers,
>
> I have problems within mouse-scrolling: I just ported a manipulator code
> from OSG version 1.0 to 1.2, and some mouse events messed up.
> I mean, GUIEventAdapter::SCROLL is recognized, but
> GUIEventAdapter::SCROLL_UP and SCROLL_DOWN are not.
I am using a Scroll-Wheel-mouse as input-device under Windows, too, and
it works like expected.
Can you show us some code?
Stephan
Sure!
Maybe I'm missing some important change in OSG 1.2 regarding event handling... btw code is long, here posting handle() function:
bool BoostManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us){
switch( ea.getEventType() ){
// ...
// other "cases"
// ...
case(GUIEventAdapter::SCROLL):{
addMouseEvent(ea);
osg::notify(ALWAYS) << "Scroll\n"; // This line is printed when I scroll, OK
if ( MouseListener() ) us.requestRedraw();
us.requestContinuousUpdate(true);
return true;
}
case(GUIEventAdapter::SCROLL_UP):{
addMouseEvent(ea);
osg::notify(ALWAYS) << "Scroll-up\n"; // NOT PRINTED!!!
if ( MouseListener() ) us.requestRedraw();
us.requestContinuousUpdate(true);
return true;
}
case(GUIEventAdapter::SCROLL_DOWN):{
addMouseEvent(ea);
osg::notify(ALWAYS) << "Scroll-down\n"; // NOT PRINTED!!!
if ( MouseListener() ) us.requestRedraw();
us.requestContinuousUpdate(true);
return true;
}
}
Note that even commenting GUIEventAdapter::SCROLL case, SCROLL_UP and SCROLL_DOWN are never captured.
My MouseListener() does not influence the osg::notify output, so I think cannot be responsable of event skipping.
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
