Changeset 1615 for code/branches/hud/src/orxonox/overlays/OverlayText.h
- Timestamp:
- Jun 22, 2008, 12:06:55 AM (16 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hud/src/orxonox/overlays/OverlayText.h
r1614 r1615 27 27 */ 28 28 29 #ifndef _ HUDText_H__30 #define _ HUDText_H__29 #ifndef _OverlayText_H__ 30 #define _OverlayText_H__ 31 31 32 32 #include "OrxonoxPrereqs.h" … … 34 34 #include <string> 35 35 #include <OgrePrerequisites.h> 36 #include " overlays/OrxonoxOverlay.h"36 #include "OrxonoxOverlay.h" 37 37 38 38 namespace orxonox 39 39 { 40 class _OrxonoxExport HUDText : public OrxonoxOverlay41 {42 public:43 HUDText();44 virtual ~HUDText();40 class _OrxonoxExport OverlayText : public OrxonoxOverlay 41 { 42 public: 43 OverlayText(); 44 virtual ~OverlayText(); 45 45 46 virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);46 virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); 47 47 48 protected: 49 void setCaption(const std::string& caption); 50 const std::string& getCaption() const; 51 void setFont(const std::string& font); 52 std::string getFont() const; 48 protected: 49 virtual void sizeChanged(); 53 50 54 Ogre::TextAreaOverlayElement* text_; 51 void setCaption(const std::string& caption) { this->caption_ = caption; } 52 const std::string& getCaption() const { return this->caption_; } 55 53 56 private: 57 std::string caption_; 58 }; 54 void setFont(const std::string& font); 55 const std::string& getFont() const; 56 57 void setTextSize(float size) { this->setSize(Vector2(size, size)); } 58 float getTextSize() const { return this->getUncorrectedSize().y; } 59 60 Ogre::TextAreaOverlayElement* text_; 61 62 private: 63 std::string caption_; 64 }; 59 65 } 60 #endif /* _ HUDText_H__ */66 #endif /* _OverlayText_H__ */
Note: See TracChangeset
for help on using the changeset viewer.