Changeset 2785
- Timestamp:
- Mar 15, 2009, 11:41:25 AM (16 years ago)
- Location:
- code/branches/questsystem5/src/orxonox
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem5/src/orxonox/objects/quest/AddQuest.cc
r2779 r2785 97 97 try 98 98 { 99 Quest* quest = QuestManager:: findQuest(this->getQuestId());99 Quest* quest = QuestManager::getInstance().findQuest(this->getQuestId()); 100 100 if(quest == NULL || !quest->start(player)) 101 101 { -
code/branches/questsystem5/src/orxonox/objects/quest/AddQuestHint.cc
r2779 r2785 117 117 try 118 118 { 119 QuestHint* hint = QuestManager:: findHint(this->hintId_);119 QuestHint* hint = QuestManager::getInstance().findHint(this->hintId_); 120 120 if(hint == NULL || !hint->setActive(player)) 121 121 { -
code/branches/questsystem5/src/orxonox/objects/quest/CompleteQuest.cc
r2779 r2785 96 96 try 97 97 { 98 quest = QuestManager:: findQuest(this->getQuestId());98 quest = QuestManager::getInstance().findQuest(this->getQuestId()); 99 99 if(quest == NULL || !quest->complete(player)) 100 100 { -
code/branches/questsystem5/src/orxonox/objects/quest/FailQuest.cc
r2779 r2785 95 95 try 96 96 { 97 quest = QuestManager:: findQuest(this->getQuestId());97 quest = QuestManager::getInstance().findQuest(this->getQuestId()); 98 98 if(quest == NULL || !quest->fail(player)) 99 99 { -
code/branches/questsystem5/src/orxonox/objects/quest/Quest.cc
r2779 r2785 79 79 XMLPortObject(Quest, QuestEffect, "complete-effects", addCompleteEffect, getCompleteEffect, xmlelement, mode); 80 80 81 QuestManager:: registerQuest(this); //!<Registers the Quest with the QuestManager.81 QuestManager::getInstance().registerQuest(this); //!<Registers the Quest with the QuestManager. 82 82 } 83 83 -
code/branches/questsystem5/src/orxonox/objects/quest/QuestHint.cc
r2779 r2785 73 73 SUPER(QuestHint, XMLPort, xmlelement, mode); 74 74 75 QuestManager:: registerHint(this); //!< Registers the QuestHint with the QuestManager.75 QuestManager::getInstance().registerHint(this); //!< Registers the QuestHint with the QuestManager. 76 76 77 77 COUT(3) << "New QuestHint {" << this->getId() << "} created." << std::endl; -
code/branches/questsystem5/src/orxonox/objects/quest/QuestListener.cc
r2779 r2785 112 112 bool QuestListener::setQuestId(const std::string & id) 113 113 { 114 this->quest_ = QuestManager:: findQuest(id); //!< Find the Quest corresponding to the given questId.114 this->quest_ = QuestManager::getInstance().findQuest(id); //!< Find the Quest corresponding to the given questId. 115 115 116 116 if(this->quest_ == NULL) //!< If there is no such Quest. -
code/branches/questsystem5/src/orxonox/objects/quest/QuestManager.cc
r2779 r2785 43 43 namespace orxonox 44 44 { 45 //! All Quests registered by their id's. 46 std::map<std::string, Quest*> QuestManager::questMap_s; 47 //! All QuestHints registered by their id's. 48 std::map<std::string, QuestHint*> QuestManager::hintMap_s; 45 //! Pointer to the current (and single) instance of this class. 46 QuestManager* QuestManager::singletonRef_s = NULL; 49 47 50 48 /** 51 49 @brief 52 50 Constructor. Registers the object. 53 */ 54 QuestManager::QuestManager(BaseObject* creator) : BaseObject(creator) 55 { 56 RegisterObject(QuestManager); 51 @todo 52 Is inheriting from BaseObject proper? 53 */ 54 QuestManager::QuestManager() : BaseObject(this) 55 { 56 RegisterRootObject(QuestManager); 57 57 58 } 58 59 … … 64 65 { 65 66 67 } 68 69 /** 70 @brief 71 Returns a reference to the current (and single) instance of the QuestManager, and creates one if there isn't one to begin with. 72 @return 73 Returns a reference to the single instance of the Quest Manager. 74 */ 75 /*static*/ QuestManager & QuestManager::getInstance() 76 { 77 if(singletonRef_s == NULL) 78 { 79 singletonRef_s = new QuestManager(); 80 } 81 return *singletonRef_s; 66 82 } 67 83 … … 75 91 Returns true if successful, false if not. 76 92 */ 77 /*static*/bool QuestManager::registerQuest(Quest* quest)93 bool QuestManager::registerQuest(Quest* quest) 78 94 { 79 95 if(quest == NULL) //!< Doh! Just as if there were actual quests behind NULL-pointers. … … 84 100 85 101 std::pair<std::map<std::string, Quest*>::iterator,bool> result; 86 result = questMap_s.insert( std::pair<std::string,Quest*>(quest->getId(),quest) ); //!< Inserting the Quest.102 result = this->questMap_.insert( std::pair<std::string,Quest*>(quest->getId(),quest) ); //!< Inserting the Quest. 87 103 88 104 if(result.second) //!< If inserting was a success. … … 107 123 Returns true if successful, false if not. 108 124 */ 109 /*static*/bool QuestManager::registerHint(QuestHint* hint)125 bool QuestManager::registerHint(QuestHint* hint) 110 126 { 111 127 if(hint == NULL) //!< Still not liking NULL-pointers. … … 116 132 117 133 std::pair<std::map<std::string, QuestHint*>::iterator,bool> result; 118 result = hintMap_s.insert ( std::pair<std::string,QuestHint*>(hint->getId(),hint) ); //!< Inserting the QuestHSint.134 result = this->hintMap_.insert ( std::pair<std::string,QuestHint*>(hint->getId(),hint) ); //!< Inserting the QuestHSint. 119 135 120 136 if(result.second) //!< If inserting was a success. … … 141 157 Throws an exception if the given questId is invalid. 142 158 */ 143 /*static*/Quest* QuestManager::findQuest(const std::string & questId)159 Quest* QuestManager::findQuest(const std::string & questId) 144 160 { 145 161 if(!QuestItem::isId(questId)) //!< Check vor validity of the given id. … … 149 165 150 166 Quest* quest; 151 std::map<std::string, Quest*>::iterator it = questMap_s.find(questId);152 if (it != questMap_s.end()) //!< If the Quest is registered.167 std::map<std::string, Quest*>::iterator it = this->questMap_.find(questId); 168 if (it != this->questMap_.end()) //!< If the Quest is registered. 153 169 { 154 170 quest = it->second; … … 175 191 Throws an exception if the given hintId is invalid. 176 192 */ 177 /*static*/QuestHint* QuestManager::findHint(const std::string & hintId)193 QuestHint* QuestManager::findHint(const std::string & hintId) 178 194 { 179 195 if(!QuestItem::isId(hintId)) //!< Check vor validity of the given id. … … 183 199 184 200 QuestHint* hint; 185 std::map<std::string, QuestHint*>::iterator it = hintMap_s.find(hintId);186 if (it != hintMap_s.end()) //!< If the QuestHint is registered.201 std::map<std::string, QuestHint*>::iterator it = this->hintMap_.find(hintId); 202 if (it != this->hintMap_.end()) //!< If the QuestHint is registered. 187 203 { 188 204 hint = it->second; -
code/branches/questsystem5/src/orxonox/objects/quest/QuestManager.h
r2779 r2785 46 46 /** 47 47 @brief 48 Is a static classand manages Quests, by registering every Quest/QuestHint (through registerX()) and making them globally accessable (through findX()).48 Is a Singleton and manages Quests, by registering every Quest/QuestHint (through registerX()) and making them globally accessable (through findX()). 49 49 Quests (and QuestHints) are registered in the QuestManager with their id, and can be accessed in the same way. 50 50 @author … … 54 54 { 55 55 56 protected: 57 QuestManager(); 58 56 59 public: 57 QuestManager(BaseObject* creator);58 60 virtual ~QuestManager(); 59 61 60 static bool registerQuest(Quest* quest); //!< Registers a Quest in the QuestManager. 61 static bool registerHint(QuestHint* quest); //!< Registers a QuestHint in the QuestManager. 62 static QuestManager& getInstance(); //!< Returns a reference to the single instance of the Quest Manager. 62 63 63 static Quest* findQuest(const std::string & questId); //!< Returns the Quest with the input id. 64 static QuestHint* findHint(const std::string & hintId); //!< Returns the QuestHint with the input id. 64 bool registerQuest(Quest* quest); //!< Registers a Quest in the QuestManager. 65 bool registerHint(QuestHint* quest); //!< Registers a QuestHint in the QuestManager. 66 67 Quest* findQuest(const std::string & questId); //!< Returns the Quest with the input id. 68 QuestHint* findHint(const std::string & hintId); //!< Returns the QuestHint with the input id. 65 69 66 70 private: 67 static std::map<std::string, Quest*> questMap_s; //!< All Quests registered by their id's. 68 static std::map<std::string, QuestHint*> hintMap_s; //!< All QuestHints registered by their id's. 71 static QuestManager* singletonRef_s; 72 73 std::map<std::string, Quest*> questMap_; //!< All Quests registered by their id's. 74 std::map<std::string, QuestHint*> hintMap_; //!< All QuestHints registered by their id's. 69 75 70 76 }; -
code/branches/questsystem5/src/orxonox/overlays/notifications/Notification.cc
r2779 r2785 106 106 { 107 107 this->sender_ = sender; 108 bool successful = NotificationManager:: registerNotification(this);108 bool successful = NotificationManager::getInstance().registerNotification(this); 109 109 if(!successful) 110 110 return false; -
code/branches/questsystem5/src/orxonox/overlays/notifications/NotificationManager.cc
r2783 r2785 48 48 const std::string NotificationManager::NONE = "none"; 49 49 50 std::multimap<std::time_t,Notification*> NotificationManager::allNotificationsList_s; 51 std::map<int,std::multimap<std::time_t,Notification*>*> NotificationManager::notificationLists_s; 52 std::map<NotificationQueue*,int> NotificationManager::queueList_s; 53 54 int NotificationManager::highestIndex_s = 0; 50 NotificationManager* NotificationManager::singletonRef_s = NULL; 55 51 56 52 /** … … 58 54 Constructor. Registers the Object. 59 55 */ 60 NotificationManager::NotificationManager(BaseObject* creator) : BaseObject(creator) 61 { 62 RegisterObject(NotificationManager); 56 NotificationManager::NotificationManager() : BaseObject(this) 57 { 58 RegisterRootObject(NotificationManager); 59 60 this->highestIndex_ = 0; 63 61 } 64 62 … … 69 67 NotificationManager::~NotificationManager() 70 68 { 69 } 70 71 /** 72 @brief 73 Returns the current (and single) instance of the NotificationManager. Creates one, if there isn't one to begin with. 74 @return 75 Returns a reference to the single instance of the NotificationManager. 76 */ 77 /*static*/ NotificationManager & NotificationManager::getInstance() 78 { 79 if(singletonRef_s == NULL) 80 { 81 singletonRef_s = new NotificationManager(); 82 } 83 return *singletonRef_s; 71 84 } 72 85 … … 79 92 Returns true if successful. 80 93 */ 81 /*static*/bool NotificationManager::registerNotification(Notification* notification)94 bool NotificationManager::registerNotification(Notification* notification) 82 95 { 83 96 … … 87 100 std::time_t time = std::time(0); //TDO: Doesn't this expire? //!< Get current time. 88 101 89 allNotificationsList_s.insert(std::pair<std::time_t,Notification*>(time,notification));102 this->allNotificationsList_.insert(std::pair<std::time_t,Notification*>(time,notification)); 90 103 91 104 if(notification->getSender() == NONE) //!< If the sender has no specific name, then the Notification is only added to the list of all Notifications. … … 97 110 98 111 //!< Insert the notification in all queues that have its sender as target. 99 for(std::map<NotificationQueue*,int>::iterator it = queueList_s.begin(); it != queueList_s.end(); it++) //!< Iterate through all queues.112 for(std::map<NotificationQueue*,int>::iterator it = this->queueList_.begin(); it != this->queueList_.end(); it++) //!< Iterate through all queues. 100 113 { 101 114 std::set<std::string> set = it->first->getTargetsSet(); 102 115 if(all || set.find(notification->getSender()) != set.end() || set.find(ALL) != set.end()) //TDO: Make sure this works. 103 116 { 104 notificationLists_s[it->second]->insert(std::pair<std::time_t,Notification*>(time,notification)); //!< Insert the Notification in the Notifications list of the current NotificationQueue.117 this->notificationLists_[it->second]->insert(std::pair<std::time_t,Notification*>(time,notification)); //!< Insert the Notification in the Notifications list of the current NotificationQueue. 105 118 it->first->update(notification, time); //!< Update the queue. 106 119 } … … 120 133 Returns true if successful. 121 134 */ 122 /*static*/bool NotificationManager::registerQueue(NotificationQueue* queue)123 { 124 NotificationManager::highestIndex_s+= 1;125 int index = NotificationManager::highestIndex_s;126 127 queueList_s[queue] = index; //!< Add the NotificationQueue to the list of queues.135 bool NotificationManager::registerQueue(NotificationQueue* queue) 136 { 137 this->highestIndex_ += 1; 138 int index = this->highestIndex_; 139 140 this->queueList_[queue] = index; //!< Add the NotificationQueue to the list of queues. 128 141 129 142 std::set<std::string> set = queue->getTargetsSet(); //TDO: Works this? … … 132 145 if(set.find(ALL) != set.end()) 133 146 { 134 notificationLists_s[index] = &allNotificationsList_s;147 this->notificationLists_[index] = &this->allNotificationsList_; 135 148 COUT(3) << "NotificationQueue registered with the NotificationManager." << std::endl; 136 149 return true; 137 150 } 138 151 139 notificationLists_s[index] = new std::multimap<std::time_t,Notification*>;140 std::multimap<std::time_t,Notification*> map = * notificationLists_s[index];152 this->notificationLists_[index] = new std::multimap<std::time_t,Notification*>; 153 std::multimap<std::time_t,Notification*> map = *this->notificationLists_[index]; 141 154 142 155 //! Iterate through all Notifications to determine whether any of them should belong to the newly registered NotificationQueue. 143 for(std::multimap<std::time_t,Notification*>::iterator it = allNotificationsList_s.begin(); it != allNotificationsList_s.end(); it++)156 for(std::multimap<std::time_t,Notification*>::iterator it = this->allNotificationsList_.begin(); it != this->allNotificationsList_.end(); it++) 144 157 { 145 158 if(set.find(it->second->getSender()) != set.end()) //!< Checks whether the overlay has the sender of the current notification as target. … … 170 183 Make sure the map is deleted. 171 184 */ 172 /*static*/std::multimap<std::time_t,Notification*>* NotificationManager::getNotifications(NotificationQueue* queue, const std::time_t & timeFrameStart, const std::time_t & timeFrameEnd)173 { 174 std::multimap<std::time_t,Notification*>* notifications = NotificationManager::notificationLists_s[NotificationManager::queueList_s[queue]];185 std::multimap<std::time_t,Notification*>* NotificationManager::getNotifications(NotificationQueue* queue, const std::time_t & timeFrameStart, const std::time_t & timeFrameEnd) 186 { 187 std::multimap<std::time_t,Notification*>* notifications = this->notificationLists_[this->queueList_[queue]]; 175 188 176 189 if(notifications == NULL) -
code/branches/questsystem5/src/orxonox/overlays/notifications/NotificationManager.h
r2779 r2785 50 50 /** 51 51 @brief 52 The NotificationManager functions as a gateway between Notifications and NotificationQueues.52 The Singleton NotificationManager functions as a gateway between Notifications and NotificationQueues. 53 53 It receives, organizes Notifications and the redistributes them to the specific NotificationQueues. 54 54 @author … … 57 57 class _OrxonoxExport NotificationManager : public BaseObject 58 58 { 59 protected: 60 NotificationManager(); 61 59 62 public: 60 NotificationManager(BaseObject* creator);61 63 virtual ~NotificationManager(); 62 64 … … 64 66 static const std::string NONE; 65 67 68 static NotificationManager & getInstance(); //! Returns a reference to the single instance of the NotificationManager. 69 66 70 //TDO: Visibility? 67 staticbool registerNotification(Notification* notification); //!< Registers a Notification within the NotificationManager.68 staticbool registerQueue(NotificationQueue* queue); //!< Registers a NotificationQueue within the NotificationManager.71 bool registerNotification(Notification* notification); //!< Registers a Notification within the NotificationManager. 72 bool registerQueue(NotificationQueue* queue); //!< Registers a NotificationQueue within the NotificationManager. 69 73 70 st atic std::multimap<std::time_t,Notification*>* getNotifications(NotificationQueue* queue, const std::time_t & timeFrameStart, const std::time_t & timeFrameEnd); //!< Returns the Notifications for a specific NotificationQueue in a specified timeframe.74 std::multimap<std::time_t,Notification*>* getNotifications(NotificationQueue* queue, const std::time_t & timeFrameStart, const std::time_t & timeFrameEnd); //!< Returns the Notifications for a specific NotificationQueue in a specified timeframe. 71 75 72 76 /** … … 76 80 @return Returns a time-ordered list of Notifications. 77 81 */ 78 st atic std::multimap<std::time_t,Notification*>* getNotifications(NotificationQueue* queue, const std::time_t & timeFrameStart)79 { return NotificationManager::getNotifications(queue, timeFrameStart, std::time(0)); }82 std::multimap<std::time_t,Notification*>* getNotifications(NotificationQueue* queue, const std::time_t & timeFrameStart) 83 { return this->getNotifications(queue, timeFrameStart, std::time(0)); } 80 84 /** 81 85 @brief Fetches the Notifications for a specific NotificationQueue starting at a specified timespan before now. … … 84 88 @return Returns a time-ordered list of Notifications. 85 89 */ 86 st atic std::multimap<std::time_t,Notification*>* getNotifications(NotificationQueue* queue, int timeDelay)87 { return NotificationManager::getNotifications(queue, std::time(0)-timeDelay, std::time(0)); }90 std::multimap<std::time_t,Notification*>* getNotifications(NotificationQueue* queue, int timeDelay) 91 { return this->getNotifications(queue, std::time(0)-timeDelay, std::time(0)); } 88 92 89 private: 90 static int highestIndex_s; //!< This variable holds the highest index (resp. key) in notificationLists_s, to secure that no key appears twice. 93 private: 94 static NotificationManager* singletonRef_s; 95 96 int highestIndex_; //!< This variable holds the highest index (resp. key) in notificationLists_s, to secure that no key appears twice. 91 97 92 st atic std::multimap<std::time_t,Notification*> allNotificationsList_s; //!< Container where all notifications are stored (together with their respecive timestamps).93 st atic std::map<NotificationQueue*,int> queueList_s; //!< Container where all NotificationQueues are stored with a number as identifier.94 st atic std::map<int,std::multimap<std::time_t,Notification*>*> notificationLists_s; //!< Container where all Notifications, for each identifier (associated with a NotificationQueue), are stored.98 std::multimap<std::time_t,Notification*> allNotificationsList_; //!< Container where all notifications are stored (together with their respecive timestamps). 99 std::map<NotificationQueue*,int> queueList_; //!< Container where all NotificationQueues are stored with a number as identifier. 100 std::map<int,std::multimap<std::time_t,Notification*>*> notificationLists_; //!< Container where all Notifications, for each identifier (associated with a NotificationQueue), are stored. 95 101 96 102 -
code/branches/questsystem5/src/orxonox/overlays/notifications/NotificationOverlay.cc
r2783 r2785 74 74 this->setFont(this->queue_->getFont()); 75 75 this->setTextSize(this->queue_->getFontSize()); 76 77 this->setPosition(this->queue_->getPosition()); 76 78 } 77 79 -
code/branches/questsystem5/src/orxonox/overlays/notifications/NotificationQueue.cc
r2783 r2785 46 46 47 47 const std::string NotificationQueue::DEFAULT_FONT = "VeraMono"; 48 const Vector2 NotificationQueue::DEFAULT_POSITION = Vector2(0.0,0.0); 48 49 49 50 /** … … 78 79 this->tickTime_ = 0.0; 79 80 80 NotificationManager:: registerQueue(this);81 NotificationManager::getInstance().registerQueue(this); 81 82 } 82 83 … … 90 91 this->setNotificationLength(DEFAULT_LENGTH); 91 92 this->setDisplayTime(DEFAULT_DISPLAY_TIME); 93 this->setPosition(DEFAULT_POSITION); 92 94 93 95 this->setTargets(NotificationManager::ALL); … … 113 115 XMLPortParam(NotificationQueue, "font", setFont, getFont, xmlElement, mode); 114 116 XMLPortParam(NotificationQueue, "fontSize", setFontSize, getFontSize, xmlElement, mode); 117 XMLPortParam(NotificationQueue, "position", setPosition, getPosition, xmlElement, mode); 115 118 116 119 COUT(3) << "NotificationQueue created." << std::endl; … … 152 155 this->clear(); 153 156 154 std::multimap<std::time_t,Notification*>* notifications = NotificationManager::get Notifications(this, this->displayTime_);157 std::multimap<std::time_t,Notification*>* notifications = NotificationManager::getInstance().getNotifications(this, this->displayTime_); 155 158 156 159 if(notifications == NULL) … … 315 318 return false; 316 319 this->fontSize_ = size; 317 for (std::map<Notification*, NotificationOverlayContainer*>::iterator it = this->overlays_.begin(); it != this->overlays_.end(); ++it) //!< Set the font size for each overlay.320 for (std::map<Notification*, NotificationOverlayContainer*>::iterator it = this->overlays_.begin(); it != this->overlays_.end(); it++) //!< Set the font size for each overlay. 318 321 { 319 322 it->second->overlay->setFontSize(size); … … 333 336 { 334 337 this->font_ = font; 335 for (std::map<Notification*, NotificationOverlayContainer*>::iterator it = this->overlays_.begin(); it != this->overlays_.end(); ++it) //!< Set the font for each overlay.338 for (std::map<Notification*, NotificationOverlayContainer*>::iterator it = this->overlays_.begin(); it != this->overlays_.end(); it++) //!< Set the font for each overlay. 336 339 { 337 340 it->second->overlay->setFont(font); … … 345 348 { 346 349 it->second->overlay->scroll(pos); 350 } 351 } 352 353 void NotificationQueue::positionChanged() 354 { 355 int counter = 0; 356 for (std::multiset<NotificationOverlayContainer*, NotificationOverlayContainerCompare>::iterator it = this->containers_.begin(); it != this->containers_.end(); it++) //!< Set the position for each overlay. 357 { 358 (*it)->overlay->setPosition(this->getPosition()); 359 (*it)->overlay->scroll(Vector2(0.0,(1.1*this->getFontSize())*counter)); 360 counter++; 347 361 } 348 362 } -
code/branches/questsystem5/src/orxonox/overlays/notifications/NotificationQueue.h
r2783 r2785 44 44 #include <map> 45 45 #include <ctime> 46 #include "util/Math.h"47 46 48 47 #include "orxonox/overlays/OverlayGroup.h" … … 114 113 inline int getDisplayTime() const 115 114 { return this->displayTime_; } 116 117 115 /** 118 @brief Returns the targets of this queue, reps. the senders which Notifications are displayed in this queue.119 @return Retu ns a set of string holding the different targets.116 @brief Returns the position of the NotificationQueue. 117 @return Returns the position. 120 118 */ 121 inline const std::set<std::string> & getTargetsSet() 122 { return this->targets_; } 123 bool getTargets(std::string* string) const; //!< Returns a string consisting of the concatination of the targets. 124 119 inline const Vector2 & getPosition() const 120 { return this->position_; } 125 121 /** 126 122 @brief Returns the font size used to display the Notifications. … … 135 131 inline const std::string & getFont() const 136 132 { return this->font_; } 133 134 /** 135 @brief Returns the targets of this queue, reps. the senders which Notifications are displayed in this queue. 136 @return Retuns a set of string holding the different targets. 137 */ 138 inline const std::set<std::string> & getTargetsSet() 139 { return this->targets_; } 140 bool getTargets(std::string* string) const; //!< Returns a string consisting of the concatination of the targets. 141 142 inline void setPosition(Vector2 pos) 143 { this->position_ = pos; this->positionChanged(); } 137 144 138 145 void scroll(const Vector2 pos); … … 142 149 static const int DEFAULT_LENGTH = 64; //!< The default maximum number of Notifications displayed. 143 150 static const int DEFAULT_DISPLAY_TIME = 30; //!< The default display time. 144 static const float DEFAULT_FONT_SIZE = 0.02; //!< The default font size. 151 static const float DEFAULT_FONT_SIZE = 0.025; //!< The default font size. 152 145 153 static const std::string DEFAULT_FONT; //!< The default font. 154 static const Vector2 DEFAULT_POSITION; //!< the default position. 146 155 147 156 int maxSize_; //!< The maximal number of Notifications displayed. … … 149 158 int notificationLength_; //!< The maximal number of characters a Notification-message is allowed to have. 150 159 int displayTime_; //!< The time a Notification is displayed. 160 Vector2 position_; //!< The position of the NotificationQueue. 151 161 152 162 std::set<std::string> targets_; //!< The targets the Queue displays Notifications of. … … 172 182 bool setFontSize(float size); //!< Set the font size. 173 183 bool setFont(const std::string & font); //!< Set the font. 184 185 void positionChanged(); 174 186 175 187 void addNotification(Notification* notification, const std::time_t & time); //!< Add a notification to the queue.
Note: See TracChangeset
for help on using the changeset viewer.