Updated osgwidget examples to use the new osg::clone() methods

This commit is contained in:
Robert Osfield 2008-09-17 14:23:25 +00:00
parent fbeabc23e0
commit 0598ac3b69
2 changed files with 3 additions and 3 deletions

View File

@ -89,7 +89,7 @@ int main(int argc, char** argv) {
label5->setAlignVertical(osgWidget::Widget::VA_BOTTOM);
// Test our label copy construction...
osgWidget::Label* label6 = label5->cloneAs("label6");
osgWidget::Label* label6 = osg::clone(label5,"label6");
label6->setLabel("abcdefghijklmnopqrs");
@ -108,7 +108,7 @@ int main(int argc, char** argv) {
// vbox->setAnchorHorizontal(osgWidget::Window::HA_RIGHT);
// Test our label-in-window copy construction...
osgWidget::Box* clonedBox = box->cloneAs("HBOX-new");
osgWidget::Box* clonedBox = osg::clone(box,"HBOX-new");
clonedBox->getBackground()->setColor(0.0f, 1.0f, 0.0f, 0.5f);

View File

@ -124,7 +124,7 @@ int main(int argc, char** argv) {
// Now, lets clone our existing box and create a new copy of of it, also adding that
// to the WindowManager. This demonstrates the usages of OSG's ->clone() support,
// though that is abstracted by our META_UIObject macro.
osgWidget::Window* boxCopy = box->cloneAs("newBox");
osgWidget::Window* boxCopy = osg::clone(box,"newBox");
// Move our copy to make it visible.
boxCopy->setOrigin(0.0f, 125.0f);