- Timestamp:
- Jun 21, 2006, 3:57:37 PM (18 years ago)
- Location:
- branches/gui/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/gui/gl/glgui_button.cc
r8672 r8674 98 98 99 99 100 bool GLGuiButton::processEvent(const Event& event) 101 { 102 if (event.type == SDLK_SPACE && !event.bPressed) 103 { 104 emit(released()); 105 return true; 106 } 107 return false; 108 } 109 110 100 111 /** 101 112 * @brief draws the GLGuiButton -
branches/gui/src/lib/gui/gl/glgui_button.h
r8667 r8674 40 40 41 41 virtual void draw() const; 42 virtual bool processEvent(const Event& event); 42 43 43 44 DeclareSignal0(clicked); 44 45 DeclareSignal0(released); 46 45 47 46 48 protected: -
branches/gui/src/story_entities/game_menu.cc
r8673 r8674 134 134 ErrorMessage GameMenu::loadData() 135 135 { 136 this->mainMenuBox = new OrxGui::GLGuiBox(); 137 { 138 OrxGui::GLGuiButton* startButton = new OrxGui::GLGuiPushButton("Play"); 139 this->mainMenuBox->pack(startButton); 140 141 142 OrxGui::GLGuiButton* quitButton = new OrxGui::GLGuiPushButton("Quit"); 143 this->mainMenuBox->pack(quitButton); 144 quitButton->connect(SIGNAL(quitButton, released), this, SLOT(GameMenu, quitMenu)); 145 146 147 } 148 149 136 150 GameWorld::loadData(); 137 151 } … … 160 174 { 161 175 EventHandler::getInstance()->pushState(ES_MENU); 176 177 this->mainMenuBox->showAll(); 162 178 163 179 /* now call the underlying*/ … … 226 242 void GameMenu::process(const Event &event) 227 243 { 244 if( event.type == SDLK_ESCAPE && event.bPressed == true) 245 { 246 this->setNextStoryID(WORLD_ID_GAMEEND); 247 this->stop(); 248 } 249 228 250 } 229 251 -
branches/gui/src/story_entities/game_menu.h
r8673 r8674 64 64 65 65 private: 66 OrxGui::GLGuiBox* mainMenu ;66 OrxGui::GLGuiBox* mainMenuBox; 67 67 OrxGui::GLGuiBox* audioBox; 68 68 OrxGui::GLGuiBox* videoBox;
Note: See TracChangeset
for help on using the changeset viewer.