]> git.mxchange.org Git - simgear.git/blobdiff - simgear/canvas/MouseEvent.hxx
Extend SGPickCallback to allow passing more information to callbacks
[simgear.git] / simgear / canvas / MouseEvent.hxx
index 5bbfb99334e8412423ef94f431d83e1172d750be..c84fcd2757a76dad955eac8b095b70834a301d1b 100644 (file)
@@ -38,6 +38,15 @@ namespace canvas
         click_count(0)
       {}
 
+      MouseEvent(const osgGA::GUIEventAdapter& ea):
+        button(ea.getButton()),
+        state(ea.getButtonMask()),
+        mod(ea.getModKeyMask()),
+        click_count(0)
+      {
+        time = ea.getTime();
+      }
+
       osg::Vec2f getScreenPos() const { return screen_pos; }
       osg::Vec2f getClientPos() const { return client_pos; }
       osg::Vec2f getDelta() const { return delta; }