remove unused options & add two new ones
This commit is contained in:
parent
8c2e595ff0
commit
f012620134
2 changed files with 17 additions and 23 deletions
|
@ -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; }
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue