]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/HUD/HUD.hxx
NavDisplay enhancements for Syd.
[flightgear.git] / src / Instrumentation / HUD / HUD.hxx
index 6776495f26478547ca855dc592494a6d93578a01..ade3d88dbe4af3fa877ef905648b198e648a822b 100644 (file)
@@ -45,7 +45,6 @@ using std::vector;
 #include <Airports/runways.hxx>     // FGRunway
 #include <GUI/gui.h>                // fntRenderer ?   guiErrorMessage()
 #include <GUI/new_gui.hxx>          // FGFontCache, FGColor
-#include <Include/fg_typedefs.h>
 #include <Main/fg_props.hxx>
 
 
@@ -153,6 +152,8 @@ public:
     void init();
     void update(double);
 
+  void reinit();
+
     // called from Main/renderer.cxx to draw 2D and 3D HUD
     void draw(osg::State&);
 
@@ -195,9 +196,13 @@ protected:
             int level = 0, const std::string& indent = "");
 
 private:
+    void deinit();
+    
     void draw3D();
     void draw2D(GLfloat, GLfloat, GLfloat, GLfloat);
 
+    void currentColorChanged();
+    
     class Input;
     class Item;
     class Label;
@@ -213,8 +218,8 @@ private:
     deque<Item *> _items;
     deque<Item *> _ladders;
 
-    SGPropertyNode_ptr _path;
-    SGPropertyNode_ptr _current;
+    SGPropertyNode_ptr _currentPath;
+    SGPropertyNode_ptr _currentColor;
     SGPropertyNode_ptr _visibility;
     SGPropertyNode_ptr _3DenabledN;
     SGPropertyNode_ptr _antialiasing;
@@ -223,6 +228,7 @@ private:
     SGPropertyNode_ptr _alpha_clamp;
     SGPropertyNode_ptr _brightness;
     bool _visible;
+    bool _loaded;
     bool _3Denabled;
     bool _antialiased;
     bool _transparent;
@@ -263,7 +269,7 @@ public:
         _offset = n->getFloatValue("offset", offset);
         _min = n->getFloatValue("min", min);
         _max = n->getFloatValue("max", max);
-        _coeff = 1.0 - 1.0 / powf(10, fabsf(n->getFloatValue("damp", 0.0)));
+        _coeff = 1.0 - 1.0 / powf(10, fabs(n->getFloatValue("damp", 0.0)));
         SGPropertyNode *p = ((SGPropertyNode *)n)->getNode("property", false);
         if (p) {
             const char *path = p->getStringValue();
@@ -595,7 +601,6 @@ private:
     double _default_heading;
     GLint  _view[4];
     FGRunway* _runway;
-    FGViewer* _cockpit_view;
     unsigned short _stipple_out;    // stipple pattern of the outline of the runway
     unsigned short _stipple_center; // stipple pattern of the center line of the runway
     bool   _draw_arrow;             // draw arrow when runway is not visible in HUD