Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9049 in orxonox.OLD


Ignore:
Timestamp:
Jul 3, 2006, 5:04:47 PM (18 years ago)
Author:
rennerc
Message:

table doesnt segfault anymore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/multi_player_map/src/util/multiplayer_team_deathmatch.cc

    r9023 r9049  
    8383  subscribeEvent( ES_GAME, SDLK_TAB );
    8484  subscribeEvent( ES_GAME, SDLK_F1 );
    85   subscribeEvent( ES_MENU, SDLK_F1 );
    8685  subscribeEvent( ES_MENU, KeyMapper::PEV_FIRE1 );
    8786
     
    9998  unsubscribeEvent( ES_GAME, SDLK_TAB );
    10099  unsubscribeEvent( ES_GAME, SDLK_F1 );
    101   unsubscribeEvent( ES_MENU, SDLK_F1 );
    102100  unsubscribeEvent( ES_MENU, KeyMapper::PEV_FIRE1 );
    103101
     
    534532  } else if ( event.type == SDLK_F1 )
    535533  {
     534    if ( this->statsBox && !this->bLocalPlayerDead && event.bPressed )
     535    {
     536      PRINTF(0)("hide stats\n");
     537      this->hideStats();
     538    }
    536539    if ( !this->statsBox && event.bPressed )
    537540    {
    538541      PRINTF(0)("show stats\n");
    539542      this->showStats();
    540     }
    541     if ( this->statsBox && !this->bLocalPlayerDead && event.bPressed && this->table->rowCount() != 0 && this->table->columnCount() != 0 )
    542     {
    543       PRINTF(0)("hide stats\n");
    544       this->hideStats();
    545543    }
    546544  }
     
    613611void MultiplayerTeamDeathmatch::showStats( )
    614612{
    615   EventHandler::getInstance()->pushState( ES_MENU );
    616613  statsBox = new OrxGui::GLGuiBox();
    617614  statsBox->setAbsCoor2D( 300, 100 );
    618615
    619   this->table = new OrxGui::GLGuiTable(0,0);
     616  this->table = new OrxGui::GLGuiTable(5,5);
    620617
    621618  statsBox->pack( this->table );
     
    634631      statsBox = NULL;
    635632    }
    636 
    637     EventHandler::getInstance()->popState();
    638633}
    639634
Note: See TracChangeset for help on using the changeset viewer.