Changeset 2910 for code/trunk/src/orxonox/objects/quest/QuestDescription.cc
- Timestamp:
- Apr 8, 2009, 1:36:05 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/quest/QuestDescription.cc
r2909 r2910 28 28 29 29 /** 30 @file QuestDescription.cc30 @file 31 31 @brief Implementation of the QuestDescription class. 32 32 */ … … 37 37 38 38 #include "core/CoreIncludes.h" 39 #include " QuestNotification.h"39 #include "orxonox/overlays/notifications/Notification.h" 40 40 41 41 namespace orxonox … … 89 89 @return 90 90 Returns true if successful. 91 @todo92 Make sure the messages meet the conditions.93 91 */ 94 92 bool QuestDescription::notificationHelper(const std::string & item, const std::string & status) const 95 93 { 96 94 std::string message = ""; 95 std::string title = ""; 97 96 if(item == "hint") 98 97 { 99 message = "You received a hint: '" + this->title_ + "'"; 98 title = "You received a hint: '" + this->title_ + "'"; 99 message = this->description_; 100 100 } 101 101 else if(item == "quest") … … 103 103 if(status == "start") 104 104 { 105 message = "You received a new quest: '" + this->title_ + "'"; 105 title = "You received a new quest: '" + this->title_ + "'"; 106 message = this->description_; 106 107 } 107 108 else if(status == "fail") 108 109 { 109 message = "You failed the quest: '" + this->title_ + "'"; 110 title = "You failed the quest: '" + this->title_ + "'"; 111 message = this->failMessage_; 110 112 } 111 113 else if(status == "complete") 112 114 { 113 message = "You successfully completed the quest: '" + this->title_ + "'"; 115 title = "You successfully completed the quest: '" + this->title_ + "'"; 116 message = this->completeMessage_; 114 117 } 115 118 else … … 125 128 } 126 129 127 QuestNotification* notification = new QuestNotification(message);130 Notification* notification = new Notification(0, message, title, 30); 128 131 notification->send(); 129 132 return true;
Note: See TracChangeset
for help on using the changeset viewer.