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