On Fri, 2011-03-11 at 01:17 +0100, Andrew Kos wrote: > I have a widget button--which is essentially a label--inside a widget box > which is placed somewhere within a viewer, say at 100x150. This button should > open up, right below it, a dropdown menu, which is another box. > > The issue I'm having is that if I use getOrigin() or getPosition() for the > button, I get a value of 0,0 which is where it is placed relative to the > origin of the window it is in. This causes an issue because the window that > drops down below it needs the actual position of the button relative to the > entire screen. > > Is there some way I can get this absolute position of the button origin? Or > is there some other way I can get around this issue so I can get the dropdown > window to actually be below my button?
You probably want to use the Window's ::getOrigin plus the Widget's ::getOrigin, plus any additional spacing you want. But from what you're said so far, everything is behaving as it should. Origin only differs from Position in that the Position returns the Z coordinate as well... > Thanks > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=37532#37532 > > > > > > _______________________________________________ > 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

