Changeset 6394 for code/branches/presentation2/src/modules/questsystem
- Timestamp:
- Dec 22, 2009, 2:07:44 PM (15 years ago)
- Location:
- code/branches/presentation2/src/modules/questsystem
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/modules/questsystem/QuestDescription.cc
r6387 r6394 50 50 { 51 51 RegisterObject(QuestDescription); 52 53 this->title_ = "";54 this->description_ = "";55 52 } 56 53 … … 94 91 bool QuestDescription::notificationHelper(const std::string & item, const std::string & status) const 95 92 { 96 std::string message = "";93 std::string message; 97 94 if(item == "hint") 98 95 { 99 message = "You received a hint: '" + this->title_ + "'";96 message = "You received a hint: '" + this->title_ + '\''; 100 97 } 101 98 else if(item == "quest") … … 103 100 if(status == "start") 104 101 { 105 message = "You received a new quest: '" + this->title_ + "'";102 message = "You received a new quest: '" + this->title_ + '\''; 106 103 } 107 104 else if(status == "fail") 108 105 { 109 message = "You failed the quest: '" + this->title_ + "'";106 message = "You failed the quest: '" + this->title_ + '\''; 110 107 } 111 108 else if(status == "complete") 112 109 { 113 message = "You successfully completed the quest: '" + this->title_ + "'";110 message = "You successfully completed the quest: '" + this->title_ + '\''; 114 111 } 115 112 else -
code/branches/presentation2/src/modules/questsystem/QuestGUINode.cc
r6388 r6394 134 134 if(this->window_ != NULL) 135 135 { 136 buffer = (std::string)(this->window_->getName().c_str());136 buffer = this->window_->getName().c_str(); 137 137 } 138 138 else 139 139 { 140 buffer = "";140 buffer.erase(); 141 141 } 142 142 } … … 187 187 CEGUI::Window* statusWindow = this->gui_->getWindowManager()->createWindow("TaharezLook/StaticText", stream.str()); 188 188 window->addChildWindow(statusWindow); 189 std::string status = "";189 std::string status; 190 190 if(quest->isActive(this->gui_->getPlayer())) 191 191 { -
code/branches/presentation2/src/modules/questsystem/QuestItem.cc
r6387 r6394 47 47 { 48 48 RegisterObject(QuestItem); 49 50 this->id_ = "";51 49 } 52 50 -
code/branches/presentation2/src/modules/questsystem/QuestListener.cc
r6388 r6394 183 183 { 184 184 COUT(1) << "An unforseen, never to happen, Error has occurred. This is impossible!" << std::endl; 185 return "";185 return ""; 186 186 } 187 187 } -
code/branches/presentation2/src/modules/questsystem/QuestNotification.cc
r6387 r6394 32 32 namespace orxonox { 33 33 34 const std::string QuestNotification::SENDER = "questsystem";34 const std::string QuestNotification::SENDER("questsystem"); 35 35 36 36 QuestNotification::QuestNotification(BaseObject* creator) : Notification(creator) -
code/branches/presentation2/src/modules/questsystem/notifications/Notification.cc
r6387 r6394 75 75 void Notification::initialize(void) 76 76 { 77 this->message_ = "";77 this->message_.clear(); 78 78 this->sender_ = NotificationManager::NONE; 79 79 this->sent_ = false; -
code/branches/presentation2/src/modules/questsystem/notifications/NotificationManager.cc
r6182 r6394 44 44 { 45 45 46 const std::string NotificationManager::ALL = "all";47 const std::string NotificationManager::NONE = "none";46 const std::string NotificationManager::ALL("all"); 47 const std::string NotificationManager::NONE("none"); 48 48 49 49 ManageScopedSingleton(NotificationManager, ScopeID::Root, false); -
code/branches/presentation2/src/modules/questsystem/notifications/NotificationQueue.cc
r5929 r6394 46 46 CreateFactory(NotificationQueue); 47 47 48 const std::string NotificationQueue::DEFAULT_FONT = "VeraMono";49 const Vector2 NotificationQueue::DEFAULT_POSITION = Vector2(0.0,0.0);50 const float NotificationQueue::DEFAULT_FONT_SIZE 48 const std::string NotificationQueue::DEFAULT_FONT("VeraMono"); 49 const Vector2 NotificationQueue::DEFAULT_POSITION(0.0,0.0); 50 const float NotificationQueue::DEFAULT_FONT_SIZE = 0.025f; 51 51 52 52 /** … … 271 271 if(!first) 272 272 { 273 *string += ",";273 *string += ','; 274 274 } 275 275 else … … 300 300 while( index < targets.size() ) //!< Go through the string, character by character until the end is reached. 301 301 { 302 pTemp = new std::string( "");302 pTemp = new std::string(); 303 303 while(index < targets.size() && targets[index] != ',' && targets[index] != ' ') 304 304 { … … 399 399 std::ostringstream stream; 400 400 stream << reinterpret_cast<unsigned long>(notification); 401 std::string addressString = stream.str();401 const std::string& addressString = stream.str(); 402 402 container->name = "NotificationOverlay(" + timeString + ")&" + addressString; 403 403
Note: See TracChangeset
for help on using the changeset viewer.