Changeset 1564 for code/trunk/src/orxonox/hud/BarOverlayElement.h
- Timestamp:
- Jun 8, 2008, 5:46:52 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/hud/BarOverlayElement.h
r1505 r1564 39 39 class _OrxonoxExport BarOverlayElement : public Ogre::PanelOverlayElement 40 40 { 41 public: 42 BarOverlayElement(const Ogre::String& name); 43 virtual ~BarOverlayElement(); 44 45 void init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container); 46 void resize(); 47 void setValue(float value); 48 void setColour(int colour); 49 50 inline void setRightToLeft(bool r2l) 51 { this->right2Left_ = r2l; } 52 inline bool getRightToLeft() const 53 { return this->right2Left_; } 54 inline float getValue() const 55 { return this->value_; } 56 inline int getBarColour() const 57 { return this->colour_; } 58 41 59 private: 42 bool autoColor_; // whether bar changes color automatically 60 static const int RED = 0; // predefined colours 61 static const int YELLOW = 1; 62 static const int GREEN = 2; 63 64 bool right2Left_; 65 bool autoColour_; // whether bar changes colour automatically 43 66 float value_; // progress of bar 44 int colo r_;67 int colour_; 45 68 int left_; 46 69 int top_; 47 70 int width_; 48 71 int height_; 49 int windowW_, windowH_; 72 float widthratio_; 73 int offset_; 74 int barwidth_; 50 75 Ogre::Real leftRel_; 51 76 Ogre::Real topRel_; 52 77 Ogre::Real dimRel_; 53 Ogre::OverlayManager* om; // our overlay manager54 Ogre::OverlayContainer* container_; // our parent container to attach to55 78 Ogre::OverlayContainer* background_; 56 79 Ogre::String name_; 57 58 public:59 bool left2Right;60 static const int RED = 0; // predefined colors61 static const int YELLOW = 1;62 static const int GREEN = 2;63 64 BarOverlayElement(const Ogre::String& name);65 virtual ~BarOverlayElement();66 void init(Real leftRel, Real topRel, Real dimRel, Ogre::OverlayContainer* container);67 void resize();68 void setValue(float value);69 void setColor(int color);70 float getValue();71 int getBarColor();72 80 }; 73 81 }
Note: See TracChangeset
for help on using the changeset viewer.