Changeset 10069 in orxonox.OLD for branches/gui/src/world_entities
- Timestamp:
- Dec 13, 2006, 6:32:19 PM (18 years ago)
- Location:
- branches/gui/src/world_entities/questGUI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/world_entities/questGUI/quest_gui.cc
r10066 r10069 59 59 this->toList(OM_GROUP_00); 60 60 61 this->questBox = NULL; 62 63 this->currentlyOpened = NULL; 64 61 this->questBox = NULL; 65 62 66 63 if( root != NULL) … … 94 91 LoadParam(root, "quest-picture", this, QuestGUI, setQuestPicture) 95 92 .describe("sets the picture of a quest"); 96 LoadParam(root, "quest-outline", this, QuestGUI, setQuestOutline) 97 .describe("sets the outline of a quiest"); 93 LoadParam(root, "quest-difficulty", this, QuestGUI, setQuestDifficulty) 94 .describe("sets the difficulty of a quest"); 95 LoadParam(root, "reward-description", this, QuestGUI, setRewardDescription) 96 .describe("sets the description of a reward"); 97 LoadParam(root, "reward-picture", this, QuestGUI, setRewardPicture) 98 .describe("sets the Picture of a reward"); 98 99 99 100 } … … 107 108 if (questBox == NULL) 108 109 { 109 this->questBox= new OrxGui::GLGuiBox( );110 this->questBox= new OrxGui::GLGuiBox(OrxGui::Vertical); 110 111 111 OrxGui::GLGuiBox* labelBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 112 //labelBox->setWidgetSize(100, 200); 112 OrxGui::GLGuiBox* headerBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 113 { 114 OrxGui::GLGuiImage* questImage = new OrxGui::GLGuiImage(); 115 questImage->setWidgetSize(100, 100); 116 questImage->loadImageFromFile(questPicture); 117 questImage->show(); 118 headerBox->pack(questImage); 119 120 OrxGui::GLGuiBox* outlineBox = new OrxGui::GLGuiBox(OrxGui::Vertical); 121 { 122 OrxGui::GLGuiText* questDifficulty = new OrxGui::GLGuiText(); 123 questDifficulty->setText(this->questDifficulty); 124 outlineBox->pack(questDifficulty); 125 } 126 headerBox->pack(outlineBox); 127 128 } 113 129 114 OrxGui::GLGuiText* questTxt = new OrxGui::GLGuiText(); 115 questTxt->setText(this->questDescription); 116 labelBox->pack(questTxt); 130 OrxGui::GLGuiBox* labelBox = new OrxGui::GLGuiBox(OrxGui::Vertical); 131 { 132 OrxGui::GLGuiText* questTxt = new OrxGui::GLGuiText(); 133 questTxt->setText(this->questDescription); 134 labelBox->pack(questTxt); 135 } 117 136 118 OrxGui::GLGuiImage* image = new OrxGui::GLGuiImage(); 119 image->setWidgetSize(100, 100); 120 image->loadImageFromFile(questPicture); 121 image->show(); 137 138 OrxGui::GLGuiBox* rewardBox = new OrxGui::GLGuiBox(OrxGui::Vertical); 139 { 140 OrxGui::GLGuiImage* rewardImage = new OrxGui::GLGuiImage(); 141 rewardImage->setWidgetSize(50, 50); 142 rewardImage->loadImageFromFile(rewardPicture); 143 rewardImage->show(); 144 rewardBox->pack(rewardImage); 145 146 OrxGui::GLGuiText* rewardTxt = new OrxGui::GLGuiText(); 147 rewardTxt->setText(this->rewardDescription); 148 rewardBox->pack(rewardTxt); 149 } 150 151 OrxGui::GLGuiBox* answerBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 152 { 153 OrxGui::GLGuiButton* acceptButton = new OrxGui::GLGuiPushButton("Accept"); 154 answerBox->pack(acceptButton); 155 156 OrxGui::GLGuiButton* refuseButton = new OrxGui::GLGuiPushButton("Refuse"); 157 answerBox->pack(refuseButton); 158 } 159 160 this->questBox->pack(headerBox); 161 this->questBox->pack(labelBox); 162 this->questBox->pack(rewardBox); 163 this->questBox->pack(answerBox); 164 this->questBox->showAll(); 122 165 123 166 this->questBox->setAbsCoor2D(300, 40); 124 labelBox->setRelCoor2D(300, 300);125 image->setRelCoor2D(0, 0);126 127 this->questBox->pack(image);128 this->questBox->pack(labelBox);129 this->questBox->showAll();130 131 167 OrxGui::GLGuiHandler::getInstance()->activate(); 132 168 OrxGui::GLGuiHandler::getInstance()->activateCursor(); -
branches/gui/src/world_entities/questGUI/quest_gui.h
r10066 r10069 5 5 #include "world_entity.h" 6 6 #include "glgui.h" 7 #include <glgui_image.h> 7 8 #include <vector> 8 9 … … 22 23 23 24 /** @param questName sets the name of this quest */ 24 inline void setQuestName(const std::string& questName) { this->questName = questName; } 25 inline void setQuestDescription(const std::string& questDescription) { this->questDescription = questDescription; } 26 inline void setQuestPicture(const std::string& questPicture) { this->questPicture = questPicture; } 27 inline void setQuestOutline(const std::string& questOutline) { this->questOutline = questOutline; } 25 inline void setQuestName(const std::string& questName) { this->questName = questName; } 26 inline void setQuestDescription(const std::string& questDescription) { this->questDescription = questDescription; } 27 inline void setQuestPicture(const std::string& questPicture) { this->questPicture = questPicture; } 28 inline void setQuestDifficulty(const std::string& questDifficulty) { this->questDifficulty = questDifficulty; } 29 inline void setRewardDescription(const std::string& rewardDescription){ this->rewardDescription = rewardDescription; } 30 inline void setRewardPicture(const std::string& rewardPicture) { this->rewardPicture = rewardPicture; } 28 31 void guiInit(); 29 32 … … 33 36 std::string questDescription; 34 37 std::string questPicture; 35 std::string questOutline; 38 std::string questDifficulty; 39 std::string rewardDescription; 40 std::string rewardPicture; 36 41 42 OrxGui::GLGuiBox* headerBox; 43 OrxGui::GLGuiBox* outlineBox; 44 OrxGui::GLGuiBox* labelBox; 37 45 OrxGui::GLGuiBox* questBox; 38 39 OrxGui::GLGuiBox* currentlyOpened; 46 OrxGui::GLGuiImage* questImage; 47 OrxGui::GLGuiBox* rewardBox; 48 OrxGui::GLGuiImage* rewardImage; 49 OrxGui::GLGuiBox* answerBox; 40 50 41 51 OrxSound::SoundSource* selectorSource;
Note: See TracChangeset
for help on using the changeset viewer.