Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8774 in orxonox.OLD for branches


Ignore:
Timestamp:
Jun 25, 2006, 11:14:09 AM (18 years ago)
Author:
rennerc
Message:

frag table can be hidden with f1 now

File:
1 edited

Legend:

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

    r8773 r8774  
    8181  subscribeEvent( ES_GAME, SDLK_TAB );
    8282  subscribeEvent( ES_GAME, SDLK_F1 );
     83  subscribeEvent( ES_MENU, SDLK_F1 );
    8384  subscribeEvent( ES_MENU, KeyMapper::PEV_FIRE1 );
    8485 
     
    101102  unsubscribeEvent( ES_GAME, SDLK_TAB );
    102103  unsubscribeEvent( ES_GAME, SDLK_F1 );
     104  unsubscribeEvent( ES_MENU, SDLK_F1 );
    103105  unsubscribeEvent( ES_MENU, KeyMapper::PEV_FIRE1 );
    104106 
     
    550552  } else if ( event.type == SDLK_F1 )
    551553  {
    552     if ( event.bPressed )
     554    if ( !this->statsBox && event.bPressed )
     555    {
     556      PRINTF(0)("show stats\n");
    553557      this->showStats();
     558    }
     559    if ( this->statsBox && !this->bLocalPlayerDead && event.bPressed && this->table->rowCount() != 0 && this->table->columnCount() != 0 )
     560    {
     561      PRINTF(0)("hide stats\n");
     562      this->hideStats();
     563    }
    554564  }
    555565  else if ( event.type == SDLK_TAB )
     
    565575    }
    566576  }
    567   else if ( statsBox && event.type == KeyMapper::PEV_FIRE1 )
     577  else if ( this->bLocalPlayerDead && statsBox && event.type == KeyMapper::PEV_FIRE1 )
    568578  {
    569579    this->hideStats();
     
    625635  statsBox->setAbsCoor2D( 300, 100 );
    626636 
    627   this->table = new OrxGui::GLGuiTable(4, 4);
     637  this->table = new OrxGui::GLGuiTable(0,0);
    628638
    629639  statsBox->pack( this->table );
    630  
    631   statsBox->setAbsCoor2D(50, 200);
    632  
     640
    633641  statsBox->showAll();
    634642}
     
    676684    PlayerStats & stats = *dynamic_cast<PlayerStats*>(*it);
    677685   
    678     assert( stats.getTeamId() == 0 || stats.getTeamId() == 1 );
    679     if ( stats.getTeamId() == 0 )
    680       fragsTeam0[stats.getScore()] = stats.getNickName();
    681     else
    682       fragsTeam1[stats.getScore()] = stats.getNickName();
     686    if ( stats.getTeamId() == 0 || stats.getTeamId() == 1 )
     687    {
     688      if ( stats.getTeamId() == 0 )
     689        fragsTeam0[stats.getScore()] = stats.getNickName();
     690      else
     691        fragsTeam1[stats.getScore()] = stats.getNickName();
     692    }
    683693  }
    684694 
Note: See TracChangeset for help on using the changeset viewer.