Changeset 10167 in orxonox.OLD for branches/gui/src
- Timestamp:
- Jan 3, 2007, 4:38:00 PM (18 years ago)
- Location:
- branches/gui/src/world_entities/questGUI
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/world_entities/questGUI/quest.cc
r10164 r10167 51 51 { 52 52 this->registerObject(this, Quest::_objectList); 53 54 this->Status = false; 53 55 54 56 if( root != NULL) … … 72 74 * @param root: root xml tag for this element 73 75 */ 76 74 77 void Quest::loadParams(const TiXmlElement* root) 75 78 { … … 89 92 } 90 93 94 void Quest::setQuestActive() 95 { 96 this->Status = true; 97 } 98 99 void Quest::setQuestInactive() 100 { 101 this->Status = false; 102 } 103 104 const bool Quest::getQuestStatus() 105 { 106 return this->Status; 107 } -
branches/gui/src/world_entities/questGUI/quest.h
r10129 r10167 19 19 20 20 virtual void loadParams(const TiXmlElement* root = NULL); 21 22 /** @param questName sets the name of this quest */ 21 23 22 inline void setQuestName(const std::string& questName) { this->questName = questName; } 24 23 inline const std::string& getQuestName() { return this->questName; } … … 33 32 inline void setRewardPicture(const std::string& rewardPicture) { this->rewardPicture = rewardPicture; } 34 33 inline const std::string& getRewardPicture() { return this->rewardPicture; } 34 void setQuestActive(); 35 void setQuestInactive(); 36 const bool getQuestStatus(); 37 35 38 36 39 37 40 private: 41 bool Status; 38 42 std::string questName; 39 43 std::string questDescription; -
branches/gui/src/world_entities/questGUI/quest_gui.cc
r10164 r10167 64 64 { 65 65 this->registerObject(this, QuestGUI::_objectList); 66 66 67 67 this->toList(OM_GROUP_00); 68 68 … … 116 116 questImage->loadImageFromFile(this->myQuest->getQuestPicture()); 117 117 questImage->show(); 118 //questImage->setBorderBottom(20);119 118 headerBox->pack(questImage); 120 119 … … 125 124 outlineBox->pack(questDifficulty); 126 125 } 126 headerBox->setBorderBottom(40); 127 127 headerBox->pack(outlineBox); 128 headerBox->setBorderBottom(100);129 130 128 } 131 129 … … 135 133 questTxt->setText(this->myQuest->getQuestDescription()); 136 134 labelBox->pack(questTxt); 137 labelBox->setBorderBottom(100); 138 labelBox->setBorderTop(100); 135 labelBox->setBorderBottom(40); 139 136 } 140 137 … … 147 144 rewardImage->show(); 148 145 rewardBox->pack(rewardImage); 149 //rewardImage->setBorderBottom(50);150 146 151 147 OrxGui::GLGuiMultiLineText* rewardTxt = new OrxGui::GLGuiMultiLineText(); 152 148 rewardTxt->setText(this->myQuest->getRewardDescription()); 149 rewardBox->setBorderBottom(40); 153 150 rewardBox->pack(rewardTxt); 154 rewardBox->setBorderBottom(100);155 156 151 } 157 152 158 153 OrxGui::GLGuiBox* answerBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 159 154 { 160 OrxGui::GLGuiButton* acceptButton = new OrxGui::GLGuiPushButton("Accept"); 161 acceptButton->released.connect(this, &QuestGUI::accept); 162 answerBox->pack(acceptButton); 163 acceptButton->select(); 155 OrxGui::GLGuiBox* acceptBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 156 { 157 OrxGui::GLGuiButton* acceptButton = new OrxGui::GLGuiPushButton("Accept"); 158 acceptButton->released.connect(this, &QuestGUI::accept); 159 acceptBox->setBorderRight(70); 160 acceptBox->pack(acceptButton); 161 } 164 162 165 OrxGui::GLGuiButton* refuseButton = new OrxGui::GLGuiPushButton("Refuse"); 166 refuseButton->released.connect(this, &QuestGUI::refuse); 167 answerBox->pack(refuseButton); 168 } 169 163 OrxGui::GLGuiBox* refuseBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 164 { 165 OrxGui::GLGuiButton* refuseButton = new OrxGui::GLGuiPushButton("Refuse"); 166 refuseButton->released.connect(this, &QuestGUI::refuse); 167 refuseBox->setBorderLeft(0); 168 refuseBox->pack(refuseButton); 169 } 170 answerBox->pack(acceptBox); 171 answerBox->pack(refuseBox); 172 } 170 173 this->questBox->pack(headerBox); 171 174 this->questBox->pack(labelBox); … … 195 198 void QuestGUI::accept() 196 199 { 200 this->myQuest->setQuestActive(); 197 201 this->bKillGui = true; 198 199 202 } 200 203 -
branches/gui/src/world_entities/questGUI/quest_gui.h
r10164 r10167 38 38 OrxGui::GLGuiImage* rewardImage; 39 39 OrxGui::GLGuiBox* answerBox; 40 OrxGui::GLGuiBox* acceptBox; 41 OrxGui::GLGuiBox* refuseBox; 40 42 41 43 OrxSound::SoundSource* selectorSource;
Note: See TracChangeset
for help on using the changeset viewer.