]> git.mxchange.org Git - flightgear.git/commitdiff
remove unused options & add two new ones
authormfranz <mfranz>
Sat, 29 Jul 2006 19:45:17 +0000 (19:45 +0000)
committermfranz <mfranz>
Sat, 29 Jul 2006 19:45:17 +0000 (19:45 +0000)
src/Instrumentation/HUD/HUD.hxx
src/Instrumentation/HUD/HUD_instrument.cxx

index 8456fd98502021ab569589b5a35964dc632aa601..1c1049d4672a4ecb4d4ec83e1dc7c379b5963c9f 100644 (file)
@@ -216,18 +216,18 @@ public:
     Units getUnits() const { return _units; }
 
     enum {
-        HORZ      = 0x0000,  // keep that at zero?
-        AUTOTICKS = 0x0001,
-        VERT      = 0x0002,
-        TOP       = 0x0004,
-        BOTTOM    = 0x0008,
-        LEFT      = 0x0010,
-        RIGHT     = 0x0020,
-        BOTH      = (LEFT|RIGHT),
-        NOTICKS   = 0x0040,
-        ARITHTIC  = 0x0080,
-        DECITICS  = 0x0100,
-        NOTEXT    = 0x0200,
+        HORIZONTAL = 0x0000,  // keep that at zero?
+        VERTICAL   = 0x0001,
+        TOP        = 0x0002,
+        BOTTOM     = 0x0004,
+        LEFT       = 0x0008,
+        RIGHT      = 0x0010,
+        HCENTER    = 0x0020,
+        VCENTER    = 0x0040,
+        NOTICKS    = 0x0080,
+        NOTEXT     = 0x0100,
+        BOTH       = (LEFT|RIGHT),
+        CENTER     = (HCENTER|VCENTER),
     };
 
     enum Adjust {
@@ -376,7 +376,7 @@ protected:
     inline float get_span()       const { return _scr_span; }
     inline int   get_digits()     const { return _digits; }
 
-    inline bool option_vert()    const { return (_options & VERT) == VERT; }
+    inline bool option_vert()    const { return (_options & VERTICAL) == VERTICAL; }
     inline bool option_left()    const { return (_options & LEFT) == LEFT; }
     inline bool option_right()   const { return (_options & RIGHT) == RIGHT; }
     inline bool option_both()    const { return (_options & BOTH) == BOTH; }
index 7f3b9ce0d4a7174023353fcea6b390a36c9116fa..aad3daa078cb40dae510ba27a503b96fdf870fb0 100644 (file)
@@ -47,12 +47,10 @@ HUD::Item::Item(HUD *hud, const SGPropertyNode *n, float x, float y) :
     vector<SGPropertyNode_ptr> opt = n->getChildren("option");
     for (unsigned int i = 0; i < opt.size(); i++) {
         const char *o = opt[i]->getStringValue();
-        if (!strcmp(o, "autoticks"))
-            _options |= AUTOTICKS;
-        else if (!strcmp(o, "vertical"))
-            _options |= VERT;
+        if (!strcmp(o, "vertical"))
+            _options |= VERTICAL;
         else if (!strcmp(o, "horizontal"))
-            _options |= HORZ;
+            _options |= HORIZONTAL;
         else if (!strcmp(o, "top"))
             _options |= TOP;
         else if (!strcmp(o, "left"))
@@ -65,10 +63,6 @@ HUD::Item::Item(HUD *hud, const SGPropertyNode *n, float x, float y) :
             _options |= (LEFT|RIGHT);
         else if (!strcmp(o, "noticks"))
             _options |= NOTICKS;
-        else if (!strcmp(o, "arithtic"))
-            _options |= ARITHTIC;
-        else if (!strcmp(o, "decitics"))
-            _options |= DECITICS;
         else if (!strcmp(o, "notext"))
             _options |= NOTEXT;
         else
@@ -78,7 +72,7 @@ HUD::Item::Item(HUD *hud, const SGPropertyNode *n, float x, float y) :
     // Set up convenience values for centroid of the box and
     // the span values according to orientation
 
-    if (_options & VERT) {
+    if (_options & VERTICAL) {
         _scr_span = _h;
     } else {
         _scr_span = _w;