[osg-users] extending the osgWidget example osgWidgetMenu

Robert Kiser rkiser at k2engineeringinc.com
Thu May 12 11:39:24 PDT 2016


Hello All

<Perhaps a newbie question>

I was looking over the example program osgWidgetMenu in the OSG 3.4.0 distribution, wanting to extend it a bit for my needs.

Specifically, I wanted to have the sub-menu fly up (pop up) when my mouse was over the menu button and then have the sub-menu disappear when I clicked on one of the sub-menu options.  The first part was easy enough.  The second part has got me stuck: how to tell the parent of the sub-menu (the menu button) to make the sub-menu disappear (presumably by calling it's _window->hide() operation).  I don't see how to get back to the derived class to get access to the _window object.

Perhaps this is obvious to a C++ guru.  (I'm very much a C++ newbie, though).

Anybody have any thoughts as to how to go about this?

Thanks in advance,

Bob Kiser

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








More information about the osg-users mailing list