Added osgUI::Widget::set/getGraphicsSubgraph() to hold the subgraph that does the rendering portion of widgets

This commit is contained in:
Robert Osfield
2014-05-22 10:02:35 +00:00
parent 0b5b3213fe
commit bda5ec4875
8 changed files with 77 additions and 78 deletions

View File

@@ -76,17 +76,15 @@ void Popup::leaveImplementation()
void Popup::createGraphicsImplementation()
{
OSG_NOTICE<<"Popup::createGraphicsImplementation()"<<std::endl;
Widget::createGraphicsImplementation();
_transform = new osg::PositionAttitudeTransform;
addChild(_transform.get());
Style* style = (getStyle()!=0) ? getStyle() : Style::instance().get();
osg::Vec4 dialogBackgroundColor(0.8,0.8,0.8,1.0);
_transform->addChild( style->createPanel(_extents, dialogBackgroundColor) );
setGraphicsSubgraph(_transform.get());
}