From Jeremy Moles, updates to osgwidget examples.
Merged by Robert Osfield from OpenSceneGraph-osgWidget-dev
This commit is contained in:
@@ -65,13 +65,13 @@ public:
|
||||
// Take special note here! Not only do the Button objects have their
|
||||
// own overridden methods for changing the color, but they have attached
|
||||
// callbacks for doing the work with local data.
|
||||
getByName("Widget_1")->addCallback(osgWidget::Callback(
|
||||
getByName("Widget_1")->addCallback(new osgWidget::Callback(
|
||||
&AddRemove::handlePressAdd,
|
||||
this,
|
||||
osgWidget::EVENT_MOUSE_PUSH
|
||||
));
|
||||
|
||||
getByName("Widget_2")->addCallback(osgWidget::Callback(
|
||||
getByName("Widget_2")->addCallback(new osgWidget::Callback(
|
||||
&AddRemove::handlePressRemove,
|
||||
this,
|
||||
osgWidget::EVENT_MOUSE_PUSH
|
||||
@@ -94,7 +94,6 @@ public:
|
||||
ss << "a random widget " << num;
|
||||
|
||||
_win1->addWidget(new ABCWidget(ss.str()));
|
||||
_win1->resize();
|
||||
|
||||
num++;
|
||||
|
||||
@@ -110,7 +109,6 @@ public:
|
||||
osgWidget::Widget* w = _win1->getObjects()[v.size() - 1].get();
|
||||
|
||||
_win1->removeWidget(w);
|
||||
_win1->resize();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user