]> git.mxchange.org Git - flightgear.git/commitdiff
- read new HUD from /sim/hud/path[1] (was: /hud)
authormfranz <mfranz>
Tue, 11 Jul 2006 16:09:35 +0000 (16:09 +0000)
committermfranz <mfranz>
Tue, 11 Jul 2006 16:09:35 +0000 (16:09 +0000)
- cosmetics

src/Instrumentation/HUD/HUD.cxx
src/Instrumentation/HUD/HUD.hxx
src/Instrumentation/HUD/HUD_ladder.cxx

index 8a6e0491615dc084e4d577b3da346f8b4447c0d2..35562ccea0237de96dbe9e712e0d19421761d49a 100644 (file)
@@ -134,7 +134,7 @@ void HUD::init()
     _font_renderer->setPointSize(_font_size);
     _text_list.setFont(_font_renderer);
 
-    load(fgGetString("/hud", "Huds/default.xml"));
+    load(fgGetString("/sim/hud/path[1]", "Huds/default.xml"));
 }
 
 
index 42e334f12d2e7df376c59991802929a75ec911b7..1a6a72a0ce97b99daddc61b6575cea3dbded6df5 100644 (file)
@@ -561,12 +561,11 @@ private:
         _locStippleLineList.add(LineSegment(x1, y1, x2, y2));
     }
 
+    enum   Type { PITCH, CLIMB_DIVE } _type;
     Input  _pitch;
     Input  _roll;
-    enum Type { PITCH, CLIMB_DIVE } _type;
-    float _width_units;
-    int    div_units;
-    unsigned int label_pos;
+    float  _width_units;
+    int    _div_units;
     unsigned int _scr_hole;
     float  _vmax;
     float  _vmin;
index 9cb0a4bafa51c1b8a32e3eda7951e348bf4f29de..544ff23c271963c49adff5dbb9b3e5caa0026605 100644 (file)
@@ -45,8 +45,7 @@ HUD::Ladder::Ladder(HUD *hud, const SGPropertyNode *n, float x, float y) :
     _pitch(n->getNode("pitch-input", false)),
     _roll(n->getNode("roll-input", false)),
     _width_units(int(n->getFloatValue("display-span"))),
-    div_units(int(fabs(n->getFloatValue("divisions")))),
-    label_pos(n->getIntValue("lbl-pos")),
+    _div_units(int(fabs(n->getFloatValue("divisions")))),
     _scr_hole(n->getIntValue("screen-hole")),
     _compression(n->getFloatValue("compression-factor")),
     _frl(n->getBoolValue("enable-fuselage-ref-line", false)),
@@ -433,7 +432,7 @@ void HUD::Ladder::draw(void)
     glRotatef(roll_value * SGD_RADIANS_TO_DEGREES, 0.0, 0.0, 1.0);
     // FRL marker not rotated - this line shifted below
 
-    if (div_units) {
+    if (_div_units) {
         const int BUFSIZE = 8;
         char buf[BUFSIZE];
         float label_length;
@@ -468,7 +467,7 @@ void HUD::Ladder::draw(void)
             for (; i < last; i++) {
                 y = (i - pitch_value) * _compression + .5f;
 
-                if (!(i % div_units)) {           //  At integral multiple of div
+                if (!(i % _div_units)) {           //  At integral multiple of div
                     snprintf(buf, BUFSIZE, "%d", i);
                     font->getBBox(buf, pointsize, italic, &left, &right, &bot, &top);
                     label_length = right + left;
@@ -513,7 +512,7 @@ void HUD::Ladder::draw(void)
                 else // _type == CLIMB_DIVE
                     y = float(i - actslope) * _compression + .5;
 
-                if (!(i % div_units)) {  //  At integral multiple of div
+                if (!(i % _div_units)) {  //  At integral multiple of div
                     snprintf(buf, BUFSIZE, "%d", i);
                     font->getBBox(buf, pointsize, italic, &left, &right, &bot, &top);
                     label_length = right + left;