Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6862 in orxonox.OLD for trunk/src/story_entities/simple_game_menu.cc


Ignore:
Timestamp:
Jan 30, 2006, 11:22:25 AM (18 years ago)
Author:
patrick
Message:

trunk: the game now always jumps back to the menu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/story_entities/simple_game_menu.cc

    r6855 r6862  
    5959  this->menuLayer.push_back(new MenuLayer());
    6060  this->menuLayer.push_back(new MenuLayer());
     61
    6162  this->layerIndex = 0;
     63  this->menuSelectedIndex = 0;
    6264
    6365  this->loadParams(root);
     
    114116
    115117  GraphicsEngine::getInstance()->displayFPS(false);
     118
     119  this->layerIndex = 0;
     120  this->menuSelectedIndex = 0;
    116121}
    117122
     
    205210
    206211
     212ErrorMessage SimpleGameMenu::unloadData()
     213{
     214  GameWorld::unloadData();
     215
     216  EventHandler::getInstance()->unsubscribe(this, ES_MENU);
     217
     218  std::vector<ImageEntity*>::iterator it;
     219  std::vector<MenuLayer*>::iterator mit;
     220  for(mit = this->menuLayer.begin(); mit != this->menuLayer.end(); mit++)
     221  {
     222    (*mit)->menuList.erase((*mit)->menuList.begin(), (*mit)->menuList.end());
     223    (*mit)->storyList.erase((*mit)->storyList.begin(), (*mit)->storyList.end());
     224  }
     225}
     226
    207227
    208228/**
Note: See TracChangeset for help on using the changeset viewer.