Changeset 2992b1a in network-game


Ignore:
Timestamp:
Sep 26, 2013, 3:41:10 AM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
321fbbc
Parents:
2ee386d
Message:

The client shows the number of players in each game

File:
1 edited

Legend:

Unmodified
Added
Removed
  • client/Client/main.cpp

    r2ee386d r2992b1a  
    454454            map<string, Game>::iterator it;
    455455            int i=0;
     456            ostringstream ossGame;
    456457            for (it = mapGames.begin(); it != mapGames.end(); it++) {
    457                al_draw_text(font, al_map_rgb(0, 255, 0), SCREEN_W*1/4-100, 120+i*15, ALLEGRO_ALIGN_LEFT, it->first.c_str());
     458               ossGame << it->first << " (" << it->second.getNumPlayers() << " players)" << endl;
     459               al_draw_text(font, al_map_rgb(0, 255, 0), SCREEN_W*1/4-100, 120+i*15, ALLEGRO_ALIGN_LEFT, ossGame.str().c_str());
     460               ossGame.clear();
     461               ossGame.str("");
    458462               i++;
    459463            }
Note: See TracChangeset for help on using the changeset viewer.