Changeset 9b1e12c in network-game
- Timestamp:
- Jun 23, 2013, 5:12:01 PM (11 years ago)
- Branches:
- master
- Children:
- b650f8a
- Parents:
- 7ca5d21
- Location:
- client/Client
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
client/Client/chat.cpp
r7ca5d21 r9b1e12c 19 19 { 20 20 for(unsigned int x=0; x<vctChat.size(); x++) 21 al_draw_text(font, color, 10, 140+x*15, ALLEGRO_ALIGN_LEFT, vctChat[x].c_str());21 al_draw_text(font, color, 5, 100+x*15, ALLEGRO_ALIGN_LEFT, vctChat[x].c_str()); 22 22 23 al_draw_text(font, color, 10, 460, ALLEGRO_ALIGN_LEFT, strPrompt.c_str()); 23 // I think this might never be used 24 al_draw_text(font, color, 5, 460, ALLEGRO_ALIGN_LEFT, strPrompt.c_str()); 24 25 } 25 26 -
client/Client/main.cpp
r7ca5d21 r9b1e12c 65 65 66 66 const float FPS = 60; 67 const int SCREEN_W = 640;68 const int SCREEN_H = 480;67 const int SCREEN_W = 1024; 68 const int SCREEN_H = 768; 69 69 70 70 enum STATE { … … 160 160 } 161 161 162 162 display = al_create_display(SCREEN_W, SCREEN_H); 163 163 if(!display) { 164 164 fprintf(stderr, "failed to create display!\n"); … … 170 170 171 171 wndLogin = new Window(0, 0, SCREEN_W, SCREEN_H); 172 wndLogin->addComponent(new Textbox( 104, 40, 100, 20, font));173 wndLogin->addComponent(new Textbox( 104, 70, 100, 20, font));174 wndLogin->addComponent(new Button( 22, 100, 90, 20, font, "Create an Account", goToRegisterScreen));175 wndLogin->addComponent(new Button( 122, 100, 60, 20, font, "Login", login));176 wndLogin->addComponent(new Button( 540, 10, 80, 20, font, "Quit", quit));172 wndLogin->addComponent(new Textbox(516, 40, 100, 20, font)); 173 wndLogin->addComponent(new Textbox(516, 70, 100, 20, font)); 174 wndLogin->addComponent(new Button(330, 100, 194, 20, font, "Create an Account", goToRegisterScreen)); 175 wndLogin->addComponent(new Button(534, 100, 60, 20, font, "Login", login)); 176 wndLogin->addComponent(new Button(920, 10, 80, 20, font, "Quit", quit)); 177 177 178 178 txtUsername = (Textbox*)wndLogin->getComponent(0); … … 180 180 181 181 wndRegister = new Window(0, 0, SCREEN_W, SCREEN_H); 182 wndRegister->addComponent(new Textbox( 104, 40, 100, 20, font));183 wndRegister->addComponent(new Textbox( 104, 70, 100, 20, font));184 wndRegister->addComponent(new Button( 22, 100, 90, 20, font, "Back", goToLoginScreen));185 wndRegister->addComponent(new Button( 122, 100, 60, 20, font, "Submit", registerAccount));186 wndRegister->addComponent(new Button( 540, 10, 80, 20, font, "Quit", quit));187 wndRegister->addComponent(new RadioButtonList( 20, 130, "Pick a class", font));182 wndRegister->addComponent(new Textbox(516, 40, 100, 20, font)); 183 wndRegister->addComponent(new Textbox(516, 70, 100, 20, font)); 184 wndRegister->addComponent(new Button(468, 100, 56, 20, font, "Back", goToLoginScreen)); 185 wndRegister->addComponent(new Button(534, 100, 70, 20, font, "Submit", registerAccount)); 186 wndRegister->addComponent(new Button(920, 10, 80, 20, font, "Quit", quit)); 187 wndRegister->addComponent(new RadioButtonList(432, 130, "Pick a class", font)); 188 188 189 189 txtUsernameRegister = (Textbox*)wndRegister->getComponent(0); … … 195 195 196 196 wndMain = new Window(0, 0, SCREEN_W, SCREEN_H); 197 wndMain->addComponent(new Textbox(95, 40, 525, 20, font));198 wndMain->addComponent(new Button(95, 70, 160, 20, font, "Send Message", sendChatMessage));199 wndMain->addComponent(new Button( 540, 10, 80, 20, font, "Logout", logout));197 wndMain->addComponent(new Textbox(95, 40, 300, 20, font)); 198 wndMain->addComponent(new Button(95, 70, 60, 20, font, "Send", sendChatMessage)); 199 wndMain->addComponent(new Button(920, 10, 80, 20, font, "Logout", logout)); 200 200 201 201 txtChat = (Textbox*)wndMain->getComponent(0); … … 365 365 // There should be label gui components that show these or each textbox should have a label 366 366 if(wndCurrent == wndLogin || wndCurrent == wndRegister) { 367 al_draw_text(font, al_map_rgb(0, 255, 0), 4 , 43, ALLEGRO_ALIGN_LEFT, "Username:");368 al_draw_text(font, al_map_rgb(0, 255, 0), 1, 73, ALLEGRO_ALIGN_LEFT, "Password:");367 al_draw_text(font, al_map_rgb(0, 255, 0), 416, 43, ALLEGRO_ALIGN_LEFT, "Username:"); 368 al_draw_text(font, al_map_rgb(0, 255, 0), 413, 73, ALLEGRO_ALIGN_LEFT, "Password:"); 369 369 } 370 370 else if(wndCurrent == wndMain) {
Note:
See TracChangeset
for help on using the changeset viewer.