Changeset 2781 for code/branches/questsystem5/src/orxonox/overlays/notifications/NotificationOverlay.h
- Timestamp:
- Mar 12, 2009, 10:42:56 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem5/src/orxonox/overlays/notifications/NotificationOverlay.h
r2779 r2781 32 32 #include "OrxonoxPrereqs.h" 33 33 34 #include "orxonox/overlays/O rxonoxOverlay.h"34 #include "orxonox/overlays/OverlayText.h" 35 35 36 36 #include <string> … … 48 48 Damian 'Mozork' Frick 49 49 */ 50 class _OrxonoxExport NotificationOverlay : public O rxonoxOverlay50 class _OrxonoxExport NotificationOverlay : public OverlayText 51 51 { 52 53 friend class NotificationQueue; //TDO: Best solution? 54 52 55 53 public: 56 54 NotificationOverlay(BaseObject* creator); … … 59 57 60 58 bool processNotification(Notification* notification); 59 60 void setFontSize(float size) 61 { this->setTextSize(size); } 61 62 62 63 protected: 63 64 const std::string clipMessage(const std::string & message); 64 const std::string clipMessage2(const std::string & message); //Outdated 65 65 66 66 private: 67 67 NotificationQueue* queue_; 68 68 Notification* notification_; 69 70 int width_; 71 72 Ogre::TextAreaOverlayElement* notificationText_; 73 69 74 70 void initialize(void); 75 71 void defineOverlay(void); 76 77 virtual void sizeChanged();78 79 void setAlignment(Ogre::TextAreaOverlayElement::Alignment alignment)80 { this->notificationText_->setAlignment(alignment); }81 void setCaption(const std::string& caption)82 { this->notificationText_->setCaption(caption); }83 void setColour(const ColourValue& colour)84 { this->notificationText_->setColour(colour); }85 void setFont(const std::string & font);86 void setFontSize(float size);87 void setWidth(int width);88 void setAlignmentString(const std::string& alignment);89 void setTextSize(float size)90 { this->setSize(Vector2(size, size)); }91 92 Ogre::TextAreaOverlayElement::Alignment getAlignment() const93 { return this->notificationText_->getAlignment(); }94 std::string getCaption() const95 { return this->notificationText_->getCaption(); }96 float getFontSize(void) const;97 const std::string & getFont(void) const98 { return this->notificationText_->getFontName(); }99 int getWidth(void) const100 { return this->width_; }101 const ColourValue& getColour() const102 { return this->notificationText_->getColour(); }103 std::string getAlignmentString() const;104 float getTextSize() const105 { return this->getSize().y; }106 72 107 73 };
Note: See TracChangeset
for help on using the changeset viewer.