Changeset 11ad6fb in network-game for client/Client
- Timestamp:
- Jan 26, 2014, 10:50:13 PM (11 years ago)
- Branches:
- master
- Children:
- dfb9363
- Parents:
- b29ff6b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
client/Client/main.cpp
rb29ff6b r11ad6fb 386 386 chatConsole.draw(font, al_map_rgb(255,255,255)); 387 387 388 al_draw_text(font, al_map_rgb(0, 255, 0), SCREEN_W*1/2-100, 120, ALLEGRO_ALIGN_LEFT, "Current Games"); 389 388 390 map<string, int>::iterator it; 389 391 int i=0; 390 ostringstream oss Game;392 ostringstream oss; 391 393 for (it = mapGames.begin(); it != mapGames.end(); it++) { 392 ossGame << it->first << " (" << it->second << " players)" << endl; 393 al_draw_text(font, al_map_rgb(0, 255, 0), SCREEN_W*1/2-100, 120+i*15, ALLEGRO_ALIGN_LEFT, ossGame.str().c_str()); 394 ossGame.clear(); 395 ossGame.str(""); 394 oss << it->first << " (" << it->second << " players)" << endl; 395 al_draw_text(font, al_map_rgb(0, 255, 0), SCREEN_W*1/2-100, 135+i*15, ALLEGRO_ALIGN_LEFT, oss.str().c_str()); 396 oss.clear(); 397 oss.str(""); 398 i++; 399 } 400 401 al_draw_text(font, al_map_rgb(0, 255, 0), SCREEN_W*3/4-100, 120, ALLEGRO_ALIGN_LEFT, "Online Players"); 402 403 map<unsigned int, Player*>::iterator itPlayers; 404 i=0; 405 for (itPlayers = mapPlayers.begin(); itPlayers != mapPlayers.end(); itPlayers++) { 406 oss << itPlayers->second->name << endl; 407 al_draw_text(font, al_map_rgb(0, 255, 0), SCREEN_W*3/4-100, 135+i*15, ALLEGRO_ALIGN_LEFT, oss.str().c_str()); 408 oss.clear(); 409 oss.str(""); 396 410 i++; 397 411 }
Note:
See TracChangeset
for help on using the changeset viewer.