Sorry Ethan,

I over read that you are using osgWidget. But you might use the same mechanism. Maybe some osgWidget expert can tell you if there is some "FRAME" like event that you can use to implement the idea below.
Hi Ethan,
Hello,

I have successfully implemented an osgWidget callback with the type osgWidget::EVENT_MOUSE_PUSH that works every time I click down the mouse. If I hold down the mouse button, the callback only gets called once (at the time of the initial mouse click). This all makes sense, but is it possible with the current version of osgWidget to have the callback repeated each frame (or at some real-time interval) as long as the mouse button is held down? This would be useful in my code, and this seems to be the default behavior when creating a regular EventHandler with case osgGA::GUIEventAdapter::KEYDOWN, etc. Any idea if this is possible with osgWidget?
This is standard behavior. The key is usually repeated by the OS at the specified repeat-rate. There is nothing like this for the mouse buttons. It makes no sense really. If you want to repeat some actions you can simply remember the mouse button state and use the MOUSE_RELEASE to reset your mouse-button state. You will get a FRAME event, well every frame, so you can repeat your desired action based on this.

Cheers
Sebastian
-Ethan

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=57536#57536





_______________________________________________
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

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to