Changeset 1568 for code/trunk/src/orxonox/hud/BarOverlayElement.h
- Timestamp:
- Jun 8, 2008, 11:34:55 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/hud/BarOverlayElement.h
r1564 r1568 24 24 * Co-authors: 25 25 * Felix Schulthess 26 * Fabian 'x3n' Landau 26 27 * 27 28 */ … … 32 33 #include "OrxonoxPrereqs.h" 33 34 35 #include <map> 36 34 37 #include <OgrePrerequisites.h> 35 38 #include <OgrePanelOverlayElement.h> 39 40 #include "util/Math.h" 36 41 37 42 namespace orxonox … … 46 51 void resize(); 47 52 void setValue(float value); 48 void setColour(int colour); 53 void addColour(float value, const ColourValue& colour); 54 void clearColours(); 49 55 50 56 inline void setRightToLeft(bool r2l) … … 54 60 inline float getValue() const 55 61 { return this->value_; } 56 inline int getBarColour() const57 { return this->colour_; }58 62 59 63 private: 60 static const int RED = 0; // predefined colours 61 static const int YELLOW = 1; 62 static const int GREEN = 2; 63 64 static unsigned int materialcount_s; 64 65 bool right2Left_; 65 66 bool autoColour_; // whether bar changes colour automatically 66 67 float value_; // progress of bar 67 int colour_;68 68 int left_; 69 69 int top_; … … 78 78 Ogre::OverlayContainer* background_; 79 79 Ogre::String name_; 80 Ogre::TextureUnitState* textureUnitState_; 81 std::map<float, ColourValue> colours_; 80 82 }; 81 83 }
Note: See TracChangeset
for help on using the changeset viewer.