Changeset 10492 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Jan 30, 2007, 1:30:44 AM (18 years ago)
- Location:
- trunk/src/world_entities/questGUI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/questGUI/quest_gui.cc
r10491 r10492 59 59 #include "script_class.h" 60 60 CREATE_SCRIPTABLE_CLASS(QuestGUI, 61 addMethod("guiInit", Executor0<QuestGUI, lua_State*>(&QuestGUI::guiInit)) 62 ->addMethod("isActive", Executor0ret<QuestGUI, lua_State*,bool>(&QuestGUI::isActive)) 61 addMethod("startGUI", Executor0<QuestGUI, lua_State*>(&QuestGUI::startGUI)) 62 ->addMethod("stopGUI", Executor0<QuestGUI, lua_State*>(&QuestGUI::stopGUI)) 63 ->addMethod("isActive", Executor0ret<QuestGUI, lua_State*,bool>(&QuestGUI::isActive)) 63 64 ); 64 65 … … 80 81 81 82 this->myQuest = new Quest(root); 83 82 84 if(root) 83 85 this->loadParams( root); … … 109 111 * initializes the gui 110 112 */ 111 void QuestGUI::guiInit() 112 { 113 void QuestGUI::startGUI() 114 { 115 this->bKillGui = false; 116 117 113 118 if (questBox == NULL) 114 119 { … … 119 124 questBox->setBorderBottom(10); 120 125 this->questBox->setBackgroundTexture("textures/gui/gui_quest_border.png"); 121 this->bKillGui = false;122 126 123 127 OrxGui::GLGuiBox* headerBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); … … 243 247 OrxGui::GLGuiHandler::getInstance()->activateCursor(); 244 248 } 245 else 246 { 249 } 250 251 void QuestGUI::stopGUI() 252 { 247 253 this->bKillGui = true; 248 }249 250 254 } 251 255 … … 278 282 this->questBox = NULL; 279 283 this->bKillGui = false; 280 } 284 this->bActive = false; 285 } -
trunk/src/world_entities/questGUI/quest_gui.h
r10374 r10492 10 10 class Quest; 11 11 12 class QuestGUI : public WorldEntity 12 class QuestGUI : public WorldEntity 13 13 { 14 14 15 15 ObjectListDeclaration(QuestGUI); 16 16 17 17 public: 18 18 QuestGUI (const TiXmlElement* root = NULL); 19 19 virtual ~QuestGUI (); 20 20 21 21 void loadParams(const TiXmlElement* root); 22 22 bool isActive(){ return this->bActive; } 23 void guiInit(); 23 24 void startGUI(); 25 void stopGUI(); 24 26 25 27 virtual void tick(float dt); 26 28 27 29 private: 28 30 Quest* myQuest; 29 31 bool bKillGui; 30 32 bool bActive; 31 33 32 34 OrxGui::GLGuiBox* headerBox; 33 OrxGui::GLGuiBox* outlineBox; 35 OrxGui::GLGuiBox* outlineBox; 34 36 OrxGui::GLGuiBox* labelBox; 35 37 OrxGui::GLGuiImage* placeImage; … … 45 47 46 48 OrxSound::SoundSource* selectorSource; 47 49 48 50 void accept(); 49 51 void refuse();
Note: See TracChangeset
for help on using the changeset viewer.