*/
class ActivePickCallbacks : public std::map<int, std::list<SGSharedPtr<SGPickCallback> > > {
public:
- void update( double dt );
+ void update( double dt, unsigned int keyModState );
void init( int button, const osgGA::GUIEventAdapter* ea );
};
}
}
-void ActivePickCallbacks::update( double dt )
+void ActivePickCallbacks::update( double dt, unsigned int keyModState )
{
// handle repeatable mouse press events
for( iterator mi = begin(); mi != end(); ++mi ) {
std::list<SGSharedPtr<SGPickCallback> >::iterator li;
for (li = mi->second.begin(); li != mi->second.end(); ++li) {
- (*li)->update(dt);
+ (*li)->update(dt, keyModState);
}
}
}
}
}
- d->activePickCallbacks.update( dt );
+ d->activePickCallbacks.update( dt, fgGetKeyModifiers() );
}
mouse::mouse ()
// Execute the mouse up event in any case, may be we should
// stop processing here?
while (!d->activePickCallbacks[b].empty()) {
- d->activePickCallbacks[b].front()->buttonReleased();
+ d->activePickCallbacks[b].front()->buttonReleased(ea->getModKeyMask());
d->activePickCallbacks[b].pop_front();
}
}