Changeset 1618 for code/branches/hud/src/orxonox/overlays/hud/HUDBar.h
- Timestamp:
- Jun 22, 2008, 11:47:09 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hud/src/orxonox/overlays/hud/HUDBar.h
r1615 r1618 41 41 namespace orxonox 42 42 { 43 class _OrxonoxExport BarColour : public BaseObject 44 { 45 public: 46 BarColour(); 47 ~BarColour() { } 48 49 void XMLPort(Element& xmlElement, XMLPort::Mode mode); 50 51 void setColour(const ColourValue& colour) { this->colour_ = colour; } 52 const ColourValue& getColour() const { return this->colour_; } 53 54 void setPosition(float pos) { this->position_ = pos; } 55 float getPosition() const { return this->position_; } 56 57 private: 58 ColourValue colour_; 59 float position_; 60 }; 61 43 62 class _OrxonoxExport HUDBar : public OrxonoxOverlay 44 63 { … … 50 69 51 70 virtual void setValue(float value); 52 void addColour(float value, const ColourValue& colour);53 71 void clearColours(); 54 72 … … 61 79 62 80 private: 81 void addColour(BarColour* colour); 82 BarColour* getColour(unsigned int index); 83 63 84 bool right2Left_; 64 85 bool autoColour_; //!< whether bar changes colour automatically … … 68 89 Ogre::TextureUnitState* textureUnitState_; 69 90 std::map<float, ColourValue> colours_; 91 std::vector<BarColour*> barColours_; 70 92 71 93 float barWidth_s;
Note: See TracChangeset
for help on using the changeset viewer.