Added KeyboardMouse::allowContinousMouseMotionUpdate(), but commented out right
now as Producer crashes when you use it..
This commit is contained in:
parent
619862f8d6
commit
eaaf758910
@ -133,9 +133,11 @@ int main( int argc, char **argv )
|
||||
|
||||
// register the callback with the keyboard mouse manger.
|
||||
kbm->setCallback( &kbmcb );
|
||||
//kbm->allowContinuousMouseMotionUpdate(true);
|
||||
kbm->startThread();
|
||||
|
||||
|
||||
|
||||
// set the globa state
|
||||
osg::ref_ptr<osg::StateSet> globalStateSet = new osg::StateSet;
|
||||
globalStateSet->setGlobalDefaults();
|
||||
|
@ -134,11 +134,16 @@ void EventAdapter::adaptButtonRelease(double time,float x, float y, unsigned int
|
||||
/** method for adapting mouse motion events whilst mouse buttons are pressed.*/
|
||||
void EventAdapter::adaptMouseMotion(double time, float x, float y)
|
||||
{
|
||||
_eventType = DRAG;
|
||||
|
||||
_eventType = (_s_accumulatedButtonMask) ?
|
||||
DRAG :
|
||||
MOVE;
|
||||
|
||||
_time = time;
|
||||
_s_mx = (int)(x*(float)(_s_Xmax-_s_Xmin))+_s_Xmin;
|
||||
_s_my = (int)(y*(float)(_s_Ymin-_s_Ymax))+_s_Ymax;
|
||||
copyStaticVariables();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user