]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/panel_io.cxx
Yank out all the glut dependencies and concentrate them in a (easily
[flightgear.git] / src / Cockpit / panel_io.cxx
index f7721a98278629feec0aeb98de70827259433aad..64641b5f74c8f4db7aa569848e63216fe1644f74 100644 (file)
 #include <string.h>            // for strcmp()
 
 #include <simgear/compiler.h>
-#include <simgear/misc/exception.hxx>
-
-#include <simgear/misc/sg_path.hxx>
+#include <simgear/structure/exception.hxx>
 #include <simgear/debug/logstream.hxx>
-#include <simgear/misc/props.hxx>
+#include <simgear/misc/sg_path.hxx>
+#include <simgear/props/props.hxx>
 
 #include STL_IOSTREAM
 #include STL_FSTREAM
@@ -132,12 +131,13 @@ readTexture (const SGPropertyNode * node)
 ////////////////////////////////////////////////////////////////////////
 
 static void
-readConditions (FGConditional * component, const SGPropertyNode * node)
+readConditions (SGConditional *component, const SGPropertyNode *node)
 {
   const SGPropertyNode * conditionNode = node->getChild("condition");
   if (conditionNode != 0)
                                // The top level is implicitly AND
-    component->setCondition(fgReadCondition(conditionNode));
+    component->setCondition(sgReadCondition(globals->get_props(),
+                                            conditionNode) );
 }
 
 
@@ -365,9 +365,11 @@ readTextChunk (const SGPropertyNode * node)
   else if (type == "number-value") {
     string propName = node->getStringValue("property");
     float scale = node->getFloatValue("scale", 1.0);
+    float offset = node->getFloatValue("offset", 0.0);
+    bool truncation = node->getBoolValue("truncate", false);
     SGPropertyNode * target = fgGetNode(propName.c_str(), true);
     chunk = new FGTextLayer::Chunk(FGTextLayer::DOUBLE_VALUE, target,
-                                  format, scale);
+                                  format, scale, offset, truncation);
   }
 
                                // Unknown type.