]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/panel_io.cxx
Prepare and implement reinit methods for instruments
[flightgear.git] / src / Cockpit / panel_io.cxx
index ecd6efd89a02c674463529642c5899e92bbb6ef2..f05d057f1b508519c9e6450ca2f02d060675163e 100644 (file)
@@ -29,6 +29,7 @@
 #include <simgear/debug/logstream.hxx>
 #include <simgear/misc/sg_path.hxx>
 #include <simgear/props/props.hxx>
+#include <simgear/props/props_io.hxx>
 
 #include <istream>
 #include <fstream>
@@ -661,8 +662,8 @@ readPanel (const SGPropertyNode * root)
   //
   // Grab the visible external viewing area, default to 
   //
-  panel->setViewHeight(root->getIntValue("view-height",
-                                        768 - panel->getHeight() + 2));
+//  panel->setViewHeight(root->getIntValue("view-height",
+//                                      768 - panel->getHeight() + 2));
 
   //
   // Grab the panel's initial offsets, default to 0, 0.
@@ -754,8 +755,8 @@ readPanel (const SGPropertyNode * root)
           int y = node->getIntValue("y", -1);
           int real_w = node->getIntValue("w", -1);
           int real_h = node->getIntValue("h", -1);
-          int w = node->getIntValue("w-base", -1);
-          int h = node->getIntValue("h-base", -1);
+//          int w = node->getIntValue("w-base", -1);
+//          int h = node->getIntValue("h-base", -1);
           
           if (x == -1 || y == -1) {
             SG_LOG( SG_COCKPIT, SG_ALERT,
@@ -763,15 +764,15 @@ readPanel (const SGPropertyNode * root)
             return 0;
           }
           
-          float w_scale = 1.0;
-          float h_scale = 1.0;
+//          float w_scale = 1.0;
+//          float h_scale = 1.0;
           if (real_w != -1) {
-            w_scale = float(real_w) / float(w);
-            w = real_w;
+//            w_scale = float(real_w) / float(w);
+//            w = real_w;
           }
           if (real_h != -1) {
-            h_scale = float(real_h) / float(h);
-            h = real_h;
+//            h_scale = float(real_h) / float(h);
+//            h = real_h;
           }
           
           SG_LOG( SG_COCKPIT, SG_BULK, "Reading instrument " << name );