Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added toggling on/off of the VolumeSettings ui via the 'E' key.

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14416 16af8721-9629-0410-8352-f15c8da7e697
  • Loading branch information...
commit a50eab3ca4f7f7d09bf02e55aef1878b605a9ccb 1 parent 84b00db
Robert OSFIELD authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/osgPresentation/deprecated/SlideShowConstructor.cpp
View
7 src/osgPresentation/deprecated/SlideShowConstructor.cpp
@@ -3093,18 +3093,17 @@ void SlideShowConstructor::addVolume(const std::string& filename, const Position
- model->addEventCallback(new VolumeSettingsCallback());
ModelData modelData;
addModel(model.get(), positionData, modelData, scriptData);
-#if 0
+#if 1
osgUI::Widget* widget = vs.valid() ? osgDB::readFile<osgUI::Widget>("ui/VolumeSettings.lua") : 0;
if (widget)
{
OSG_NOTICE<<"Addig widget"<<std::endl;
- widget->setVisible(true);
+ widget->setVisible(false);
vs->setName("VolumeSettings");
widget->getOrCreateUserDataContainer()->addUserObject(vs.get());
@@ -3118,6 +3117,8 @@ void SlideShowConstructor::addVolume(const std::string& filename, const Position
transform->setMatrix(osg::Matrix::rotate(osg::inDegrees(90.0f),osg::Vec3(1.0f,0.0f,0.0f)) * osg::Matrix::scale(slide_scale,slide_scale,slide_scale)*osg::Matrix::translate(pos));
transform->addChild(widget);
+ transform->addEventCallback(new VolumeSettingsCallback());
+
#if 0
HUDTransform* hudTransform = new HUDTransform(_hudSettings.get());
hudTransform->addChild(transform);

0 comments on commit a50eab3

Please sign in to comment.
Something went wrong with that request. Please try again.