Changeset 53d41ea in network-game for client/Client/main.cpp
- Timestamp:
- Dec 16, 2013, 2:09:45 AM (11 years ago)
- Branches:
- master
- Children:
- 1a47469
- Parents:
- e437a19
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
client/Client/main.cpp
re437a19 r53d41ea 255 255 wndLobby = new Window(0, 0, SCREEN_W, SCREEN_H); 256 256 wndLobby->addComponent(new Button(920, 10, 80, 20, font, "Logout", logout)); 257 wndLobby->addComponent(new TextLabel(SCREEN_W*1/ 4-112, 40, 110, 20, font, "Game Name:", ALLEGRO_ALIGN_RIGHT));258 wndLobby->addComponent(new Textbox(SCREEN_W*1/ 4+4, 40, 100, 20, font));259 wndLobby->addComponent(new Button(SCREEN_W*1/ 4-100, 80, 200, 20, font, "Join Existing Game", joinGame));257 wndLobby->addComponent(new TextLabel(SCREEN_W*1/2+15-112, 40, 110, 20, font, "Game Name:", ALLEGRO_ALIGN_RIGHT)); 258 wndLobby->addComponent(new Textbox(SCREEN_W*1/2+15+4, 40, 100, 20, font)); 259 wndLobby->addComponent(new Button(SCREEN_W*1/2+15-100, 80, 200, 20, font, "Join Existing Game", joinGame)); 260 260 wndLobby->addComponent(new TextLabel(SCREEN_W*3/4-112, 40, 110, 20, font, "Game Name:", ALLEGRO_ALIGN_RIGHT)); 261 261 wndLobby->addComponent(new Textbox(SCREEN_W*3/4+4, 40, 100, 20, font)); 262 262 wndLobby->addComponent(new Button(SCREEN_W*3/4-100, 80, 200, 20, font, "Create New Game", createGame)); 263 wndLobby->addComponent(new Textbox(95, 40, 300, 20, font)); 264 wndLobby->addComponent(new Button(95, 70, 60, 20, font, "Send", sendChatMessage)); 263 265 264 266 txtJoinGame = (Textbox*)wndLobby->getComponent(2); 265 267 txtCreateGame = (Textbox*)wndLobby->getComponent(5); 268 txtChat = (Textbox*)wndLobby->getComponent(7); 266 269 267 270 cout << "Created lobby screen" << endl; 268 271 272 // this is the old game screen 269 273 wndGame = new Window(0, 0, SCREEN_W, SCREEN_H); 270 274 wndGame->addComponent(new Textbox(95, 40, 300, 20, font)); … … 273 277 wndGame->addComponent(new Button(920, 10, 80, 20, font, "Logout", logout)); 274 278 275 txtChat = (Textbox*)wndGame->getComponent(0);276 277 279 wndGameDebug = new Window(0, 0, SCREEN_W, SCREEN_H); 278 280 wndGameDebug->addComponent(new Button(20, 10, 160, 20, font, "Toggle Debugging", toggleDebugging)); … … 281 283 cout << "Created game screen" << endl; 282 284 285 // this is the new game screen, without a debug console 283 286 wndNewGame = new Window(0, 0, SCREEN_W, SCREEN_H); 284 287 wndNewGame->addComponent(new Button(880, 10, 120, 20, font, "Leave Game", leaveGame)); … … 462 465 463 466 if (wndCurrent == wndLobby) { 467 chatConsole.draw(font, al_map_rgb(255,255,255)); 468 464 469 map<string, int>::iterator it; 465 470 int i=0;
Note:
See TracChangeset
for help on using the changeset viewer.