]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_commands.cxx
- adjusted for no-value constructor for FGPanel
[flightgear.git] / src / Main / fg_commands.cxx
index cedd772ac3bb3e215dff1aa6e0d292cc19fc0408..312b5fd40491eff40e04be3045de32ebbf7f02af 100644 (file)
@@ -205,17 +205,17 @@ do_property_assign (const SGPropertyNode * arg)
   SGPropertyNode * node = fgGetNode(propname, true);
 
   switch (node->getType()) {
-  case SGValue::BOOL:
+  case SGPropertyNode::BOOL:
     return node->setBoolValue(arg->getBoolValue("value"));
-  case SGValue::INT:
+  case SGPropertyNode::INT:
     return node->setIntValue(arg->getIntValue("value"));
-  case SGValue::LONG:
+  case SGPropertyNode::LONG:
     return node->setLongValue(arg->getLongValue("value"));
-  case SGValue::FLOAT:
+  case SGPropertyNode::FLOAT:
     return node->setFloatValue(arg->getFloatValue("value"));
-  case SGValue::DOUBLE:
+  case SGPropertyNode::DOUBLE:
     return node->setDoubleValue(arg->getDoubleValue("value"));
-  case SGValue::STRING:
+  case SGPropertyNode::STRING:
     return node->setStringValue(arg->getStringValue("value"));
   default:
     return node->setUnknownValue(arg->getStringValue("value"));
@@ -239,21 +239,21 @@ do_property_adjust (const SGPropertyNode * arg)
   SGPropertyNode * node = fgGetNode(propname, true);
 
   switch (node->getType()) {
-  case SGValue::BOOL:
+  case SGPropertyNode::BOOL:
     if (arg->getBoolValue("step"))
       return node->setBoolValue(!node->getBoolValue());
     else
       return true;
-  case SGValue::INT:
+  case SGPropertyNode::INT:
     return node->setIntValue(node->getIntValue()
                             + arg->getIntValue("step"));
-  case SGValue::LONG:
+  case SGPropertyNode::LONG:
     return node->setLongValue(node->getLongValue()
                              + arg->getLongValue("step"));
-  case SGValue::FLOAT:
+  case SGPropertyNode::FLOAT:
     return node->setFloatValue(node->getFloatValue()
                               + arg->getFloatValue("step"));
-  case SGValue::DOUBLE:
+  case SGPropertyNode::DOUBLE:
     return node->setDoubleValue(node->getDoubleValue()
                                + arg->getDoubleValue("step"));
   default:                     // doesn't make sense with strings
@@ -314,20 +314,20 @@ static struct {
   const char * name;
   SGCommandMgr::command_t command;
 } built_ins [] = {
-  "null", do_null,
-  "exit", do_exit,
-  "load", do_load,
-  "save", do_save,
-  "panel-load", do_panel_load,
-  "preferences-load", do_preferences_load,
-  "view-cycle", do_view_cycle,
-  "screen-capture", do_screen_capture,
-  "property-toggle", do_property_toggle,
-  "property-assign", do_property_assign,
-  "property-adjust", do_property_adjust,
-  "property-swap", do_property_swap,
-  "property-scale", do_property_scale,
-  0, 0                         // zero-terminated
+    { "null", do_null },
+    { "exit", do_exit },
+    { "load", do_load },
+    { "save", do_save },
+    { "panel-load", do_panel_load },
+    { "preferences-load", do_preferences_load },
+    { "view-cycle", do_view_cycle },
+    { "screen-capture", do_screen_capture },
+    { "property-toggle", do_property_toggle },
+    { "property-assign", do_property_assign },
+    { "property-adjust", do_property_adjust },
+    { "property-swap", do_property_swap },
+    { "property-scale", do_property_scale },
+    { 0, 0 }                   // zero-terminated
 };