Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9014 in orxonox.OLD for trunk/src/story_entities/menu


Ignore:
Timestamp:
Jul 2, 2006, 2:50:47 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: autoselect first entries in the Menu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/story_entities/menu/game_menu.cc

    r8742 r9014  
    145145      startButton->connect(SIGNAL(startButton, released), this, SLOT(GameMenu, showCampaigns));
    146146      this->mainMenuBox->pack(startButton);
     147      startButton->select();
    147148
    148149      OrxGui::GLGuiButton* networkButton = new OrxGui::GLGuiPushButton("MultiPlayer");
     
    162163  this->mainMenuBox->showAll();
    163164
     165
    164166  this->mainMenuBox->setRelCoor2D(200, 100);
    165167}
     
    182184      const std::list<BaseObject*>* storyEntities = ClassList::getList(CL_STORY_ENTITY);
    183185      std::list<BaseObject*>::const_iterator it;
     186      bool first = true;
    184187      for( it = storyEntities->begin(); it != storyEntities->end(); it++)
    185188      {
     
    192195          button->connect(SIGNAL(button, startLevel), this, SLOT(GameMenu, startLevel));
    193196          labelBox->pack(button);
     197
     198          if (first)
     199          {
     200            first = !first;
     201            button->select();
     202          }
    194203
    195204          // generating screenshoot item
Note: See TracChangeset for help on using the changeset viewer.