]> git.mxchange.org Git - simgear.git/commitdiff
Modified Files:
authorfrohlich <frohlich>
Sun, 7 Jan 2007 11:53:21 +0000 (11:53 +0000)
committerfrohlich <frohlich>
Sun, 7 Jan 2007 11:53:21 +0000 (11:53 +0000)
animation.cxx: Change the pick animation to better handle different
mouse buttons.

simgear/scene/model/animation.cxx

index 395c6a317efa5473b7526480ad1a0e01f0b6b070..c6ef34d105cb03b50bff51a66bd876a9929fd314 100644 (file)
@@ -2164,7 +2164,10 @@ SGPickAnimation::createAnimationGroup(osg::Group& parent)
   osg::Group* normalGroup = new osg::Group;
   normalGroup->addChild(commonGroup);
   SGSceneUserData* ud = SGSceneUserData::getOrCreateSceneUserData(normalGroup);
-  ud->setPickCallback(new PickCallback(getConfig(), getModelRoot()));
+  std::vector<SGPropertyNode_ptr> actions;
+  actions = getConfig()->getChildren("action");
+  for (unsigned int i = 0; i < actions.size(); ++i)
+    ud->addPickCallback(new PickCallback(actions[i], getModelRoot()));
 
   // Used to render the geometry with just yellow edges
   osg::Group* highlightGroup = new osg::Group;