On Thu, 2011-07-28 at 18:53 +0200, Daniel Cámpora wrote:
> Hi :)
>
> Well, the widget button will trigger an animation, and my whole application
> should be aware of this. I think the best way to do this is triggering a
> custom event on the start of the animation, so I'd need the GUIActionAdapter
> for my purposes.
>
> Nevermind, I'll go for a custom EventHandler then. I only wanted to know if
> this was the best solution I could go for, taking into account the amount of
> effort you've already put into the widgets :)
If you want to inject "fake" events into the system, the WindowManager
already has an osgViewer::View* you can use to cal ->getEventQueue() on
from within your callback.
bool MyClass::mouseReleased(
double x,
double y,
const osgWidget::WindowManager* wm
) {
...
wm->getView()->getEventQueue()->addEvent(YourCustomEvent);
}
Would this work? I could still be misunderstanding something, or making
assumptions (wrongly) about what I remember of osgGA. :)
> Thanks a lot for answering my questions, Jeremy,
>
> Cheers,
>
> Daniel
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=41717#41717
>
>
>
>
>
> _______________________________________________
> 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