Implemented clipping of widget to the widgets extents.
This commit is contained in:
@@ -71,8 +71,6 @@ void PushButton::leaveImplementation()
|
||||
|
||||
void PushButton::createGraphicsImplementation()
|
||||
{
|
||||
OSG_NOTICE<<"PushButton::createGraphicsImplementation()"<<std::endl;
|
||||
|
||||
osg::ref_ptr<osg::Group> group = new osg::Group;
|
||||
|
||||
Style* style = (getStyle()!=0) ? getStyle() : Style::instance().get();
|
||||
@@ -97,6 +95,8 @@ void PushButton::createGraphicsImplementation()
|
||||
|
||||
group->addChild(_textDrawable.get());
|
||||
|
||||
style->setupClipStateSet(_extents, getOrCreateStateSet());
|
||||
|
||||
setGraphicsSubgraph(group.get());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user