From f0126201348ce9982bd2619d0836fc4bdd4d658a Mon Sep 17 00:00:00 2001 From: mfranz Date: Sat, 29 Jul 2006 19:45:17 +0000 Subject: [PATCH] remove unused options & add two new ones --- src/Instrumentation/HUD/HUD.hxx | 26 +++++++++++----------- src/Instrumentation/HUD/HUD_instrument.cxx | 14 ++++-------- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/src/Instrumentation/HUD/HUD.hxx b/src/Instrumentation/HUD/HUD.hxx index 8456fd985..1c1049d46 100644 --- a/src/Instrumentation/HUD/HUD.hxx +++ b/src/Instrumentation/HUD/HUD.hxx @@ -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; } diff --git a/src/Instrumentation/HUD/HUD_instrument.cxx b/src/Instrumentation/HUD/HUD_instrument.cxx index 7f3b9ce0d..aad3daa07 100644 --- a/src/Instrumentation/HUD/HUD_instrument.cxx +++ b/src/Instrumentation/HUD/HUD_instrument.cxx @@ -47,12 +47,10 @@ HUD::Item::Item(HUD *hud, const SGPropertyNode *n, float x, float y) : vector 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;