]> git.mxchange.org Git - flightgear.git/blobdiff - src/Input/input.cxx
Moved some of the low level scene graph construction code over to simgear.
[flightgear.git] / src / Input / input.cxx
index 38aec103b8dbff75973604992ccea3bfb2736bc3..9e236f26910f3c69c68d3d4b4fea1a470096c205 100644 (file)
@@ -45,7 +45,7 @@
 
 #include <simgear/constants.h>
 #include <simgear/debug/logstream.hxx>
-#include <simgear/misc/props.hxx>
+#include <simgear/props/props.hxx>
 
 #include <Aircraft/aircraft.hxx>
 #include <Autopilot/auto_gui.hxx>
@@ -104,7 +104,7 @@ FGBinding::read (const SGPropertyNode * node)
 {
   const SGPropertyNode * conditionNode = node->getChild("condition");
   if (conditionNode != 0)
-    setCondition(fgReadCondition(conditionNode));
+    setCondition(sgReadCondition(globals->get_props(), conditionNode));
 
   _command_name = node->getStringValue("command", "");
   if (_command_name.empty()) {
@@ -162,9 +162,6 @@ FGBinding::fire (double setting) const
 // Implementation of FGInput.
 ////////////////////////////////////////////////////////////////////////
 
-                                // From main.cxx
-extern void fgReshape( int width, int height );
-
 
 FGInput::FGInput ()
 {
@@ -194,24 +191,30 @@ FGInput::init ()
   glutPassiveMotionFunc (GLUTmotion);
 }
 
+void 
+FGInput::update (double dt)
+{
+  _update_keyboard();
+  _update_joystick();
+  _update_mouse();
+}
+
 void
-FGInput::bind ()
+FGInput::suspend ()
 {
-  // no op
+    // NO-OP
 }
 
 void
-FGInput::unbind ()
+FGInput::resume ()
 {
-  // no op
+    // NO-OP
 }
 
-void 
-FGInput::update (double dt)
+bool
+FGInput::is_suspended () const
 {
-  _update_keyboard();
-  _update_joystick();
-  _update_mouse();
+    return false;
 }
 
 void
@@ -310,14 +313,6 @@ FGInput::doKey (int k, int modifiers, int x, int y)
                     FGAutopilot::FG_TC_HEADING_LOCK );
             }
             return;
-        case 256+GLUT_KEY_F11: // F11 Altitude Dialog.
-            SG_LOG(SG_INPUT, SG_INFO, "Invoking Altitude call back function");
-            NewAltitude( NULL );
-            return;
-        case 256+GLUT_KEY_F12: // F12 Heading Dialog...
-            SG_LOG(SG_INPUT, SG_INFO, "Invoking Heading call back function");
-            NewHeading( NULL );
-            return;
         }
 
 // END SPECIALS
@@ -343,9 +338,9 @@ FGInput::doMouseClick (int b, int updown, int x, int y)
   if (mode.pass_through) {
     if (puMouse(b, updown, x, y))
       return;
-    else if ((current_panel != 0) &&
-             current_panel->getVisibility() &&
-             current_panel->doMouseAction(b, updown, x, y))
+    else if ((globals->get_current_panel() != 0) &&
+             globals->get_current_panel()->getVisibility() &&
+             globals->get_current_panel()->doMouseAction(b, updown, x, y))
       return;
     else if (fgHandle3DPanelMouseEvent(b, updown, x, y))
       return;