- Timestamp:
- Dec 10, 2008, 4:19:44 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/orxonox/objects/quest/QuestDescription.h
r2371 r2385 29 29 /** 30 30 @file QuestDescription.h 31 @brief 32 Definition of the QuestDescription class. 31 @brief Definition of the QuestDescription class. 33 32 */ 34 33 … … 52 51 Creating a QuestDescription through XML goes as follows: 53 52 54 <QuestDescription title="Title" description="Description Text" />53 <QuestDescription title="Title" description="Description Text" failMessage="You fail." completeMessage="You win!" /> 55 54 @author 56 55 Damian 'Mozork' Frick … … 64 63 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestDescription object through XML. 65 64 66 /**67 @brief Returns the title.68 @return Returns a string containing the title of the QuestDescription.69 */65 /** 66 @brief Returns the title. 67 @return Returns a string containing the title of the QuestDescription. 68 */ 70 69 inline const std::string & getTitle(void) const 71 70 { return this->title_; } 72 71 73 /**74 @brief Returns the description text.75 @return Returns a string containing the description text of the QuestDescription.76 */72 /** 73 @brief Returns the description text. 74 @return Returns a string containing the description text of the QuestDescription. 75 */ 77 76 inline const std::string & getDescription(void) const 78 77 { return this->description_; } 78 79 /** 80 @brief Returns the fail message. 81 @return Returns a string containing the fail message of the QuestDescription. 82 */ 83 inline const std::string & getFailMessage(void) const 84 { return this->failMessage_; } 85 86 /** 87 @brief Returns the complete message. 88 @return Returns a string containing the complete message of the QuestDescription. 89 */ 90 inline const std::string & getCompleteMessage(void) const 91 { return this->completeMessage_; } 92 93 /** 94 @brief Sends a Notification displaying that a QuestHint was added. 95 @return Returns true if successful. 96 */ 97 inline bool sendAddHintNotification(void) const 98 { return notificationHelper("hint", ""); } 99 100 /** 101 @brief Sends a Notification displaying that a Quest was added. 102 @return Returns true if successful. 103 */ 104 inline bool sendAddQuestNotification(void) const 105 { return notificationHelper("quest", "start"); } 106 107 /** 108 @brief Sends a Notification displaying that a Quest was failed. 109 @return Returns true if successful. 110 */ 111 inline bool sendFailQuestNotification(void) const 112 { return notificationHelper("quest", "fail"); } 113 114 /** 115 @brief Sends a Notification displaying that a Quest was completed. 116 @return Returns true if successful. 117 */ 118 inline bool sendCompleteQuestNotification(void) const 119 { return notificationHelper("quest", "complete"); } 79 120 80 121 private: 81 122 std::string title_; //!< The title. 82 123 std::string description_; //!< The description. 124 std::string failMessage_; //!< The message displayed when the Quest is failed. 125 std::string completeMessage_; //!< The message displayed when the Quest is completed. 126 127 bool notificationHelper(const std::string & item, const std::string & status) const; //!< Helper for sending QuestDescriptions as Notifications. 83 128 84 129 /** … … 89 134 { this->title_ = title; } 90 135 91 /**136 /** 92 137 @brief Sets the description text. 93 138 @param description The description text to be set. … … 96 141 { this->description_ = description; } 97 142 143 /** 144 @brief Sets the fail message. 145 @param message The fail message to be set. 146 */ 147 inline void setFailMessage(const std::string & message) 148 { this->failMessage_ = message; } 149 150 /** 151 @brief Sets the complete message. 152 @param message The complete message to be set. 153 */ 154 inline void setCompleteMessage(const std::string & message) 155 { this->completeMessage_ = message; } 156 98 157 }; 99 158
Note: See TracChangeset
for help on using the changeset viewer.