Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8674 in orxonox.OLD for branches/gui/src/story_entities/game_menu.cc


Ignore:
Timestamp:
Jun 21, 2006, 3:57:37 PM (18 years ago)
Author:
bensch
Message:

Game-Menu begin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/story_entities/game_menu.cc

    r8673 r8674  
    134134ErrorMessage GameMenu::loadData()
    135135{
     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
    136150  GameWorld::loadData();
    137151}
     
    160174{
    161175  EventHandler::getInstance()->pushState(ES_MENU);
     176
     177  this->mainMenuBox->showAll();
    162178
    163179  /* now call the underlying*/
     
    226242void GameMenu::process(const Event &event)
    227243{
     244  if( event.type == SDLK_ESCAPE && event.bPressed == true)
     245  {
     246    this->setNextStoryID(WORLD_ID_GAMEEND);
     247    this->stop();
     248  }
     249
    228250}
    229251
Note: See TracChangeset for help on using the changeset viewer.