Changeset 1002 for code/branches/hud2/src/orxonox/hud/Bar.h
- Timestamp:
- Apr 8, 2008, 11:12:22 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hud2/src/orxonox/hud/Bar.h
r991 r1002 30 30 #define _BAR_H__ 31 31 32 #include <string> 33 #include <OgreColourValue.h> 34 #include <OgreOverlayElement.h> 35 #include <OgrePrerequisites.h> 32 36 #include <string.h> 33 #include <OgreOverlayElement.h>34 #include <OgreTextAreaOverlayElement.h>35 #include <OgrePrerequisites.h>36 37 #include "../OrxonoxPrereqs.h" 37 38 … … 40 41 namespace orxonox 41 42 { 42 class _OrxonoxExport Bar43 class Bar : public Ogre::OverlayElement 43 44 { 44 45 private: 45 int percentage_; 46 int dir_; 47 int left_; 48 int top_; 49 int width_; 50 int height_; 46 float percentage_; 47 bool dir_; 48 Ogre::ColourValue color_; 49 51 50 52 51 public: 53 static const int LEFT = 0;54 static const int UP = 1;55 static const int RIGHT = 2;56 static const int DOWN = 3;57 52 58 static const int RED = 0; 59 static const int YELLOW = 1; 60 static const int GREEN = 2; 61 62 Ogre::OverlayElement* element; 63 64 Bar(Ogre::Real left, Ogre::Real top, Ogre::Real width, Ogre::Real height, 65 int dir, int colour, std::string name); 66 ~Bar(void); 67 void reset(int percentage); 68 void setColour(int colour); 69 void show(); 70 void hide(); 71 72 }; 53 Bar(const Ogre::String& name); 54 // virtual ~Bar(); 73 55 74 56 75 class _OrxonoxExport SmartBar : public Bar76 {77 private:78 57 79 public: 80 SmartBar(Ogre::Real left, Ogre::Real top, Ogre::Real width, Ogre::Real height, 81 int dir, std::string name);82 ~SmartBar(void);83 void reset(int percentage);84 };58 59 /* Bar(const Ogre::String& s); 60 ~Bar(void); 61 void setPercentage(float percentage); 62 void setColor(Ogre::ColourValue color); 63 */ }; 85 64 } 86 65
Note: See TracChangeset
for help on using the changeset viewer.