So i see what you mean. But how can I declare the position of my widget
relative to the parented window ?
Here's the code I use:
[code]
const unsigned int MASK_2D = 0xF0000000;
// note: osgViewer::Viewer* ptrViewer;
// note: osg::ref_ptr<osg::Group> _rootScene;
// note: ptrViewer->setSceneData(_rootScene);
osgWidget::WindowManager* wm = new osgWidget::WindowManager(
ptrViewer,
ptrViewer->width(),
ptrViewer->height(),
MASK_2D,
osgWidget::WindowManager::WM_PICK_DEBUG
);
osgWidget::Window* box = new osgWidget::Box("HBOX", osgWidget::Box::VERTICAL,
true);
osgWidget::Widget * testWidget = new osgWidget::Widget("test", 100.0f, 100.0f);
testWidget->setColor(1, 0, 0, 1.0);
box->addWidget(testWidget);
//box->setAnchorHorizontal(osgWidget::Window::HA_RIGHT);
//box->setAnchorVertical(osgWidget::Window::VA_TOP);
box->setVisibilityMode(osgWidget::Window::VM_ENTIRE);
wm->addChild(box);
// rotation
box->setRotate(45.0);
osg::Group* group = new osg::Group();
osg::Camera* camera = wm->createParentOrthoCamera();
_rootScene->addChild(camera);
wm->resizeAllWindows();
[/code]
may be I am wrong with this code ?
Thanks !
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49635#49635
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org