Changeset 49da01a in network-game for client/Client


Ignore:
Timestamp:
Jul 22, 2013, 11:52:39 PM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
dee75cc
Parents:
365e156
Message:

Add status messages for login and registration and remove the Message class (MessageProcessor includes all that functionality now)

Location:
client/Client
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • client/Client/Client.vcxproj

    r365e156 r49da01a  
    7171    <ClCompile Include="..\..\common\Projectile.cpp" />
    7272    <ClCompile Include="..\..\common\WorldMap.cpp" />
    73     <ClCompile Include="..\..\common\Message.cpp" />
    7473    <ClCompile Include="..\..\common\Player.cpp" />
    7574    <ClCompile Include="chat.cpp" />
     
    8887    <ClInclude Include="..\..\common\Projectile.h" />
    8988    <ClInclude Include="..\..\common\WorldMap.h" />
    90     <ClInclude Include="..\..\common\Message.h" />
    9189    <ClInclude Include="..\..\common\Player.h" />
    9290    <ClInclude Include="chat.h" />
  • client/Client/Client.vcxproj.filters

    r365e156 r49da01a  
    4343      <Filter>Source Files\gui</Filter>
    4444    </ClCompile>
    45     <ClCompile Include="..\..\common\Message.cpp">
    46       <Filter>Source Files\common</Filter>
    47     </ClCompile>
    4845    <ClCompile Include="Window.cpp">
    4946      <Filter>Source Files\gui</Filter>
     
    8784      <Filter>Header Files\common</Filter>
    8885    </ClInclude>
    89     <ClInclude Include="..\..\common\Message.h">
    90       <Filter>Header Files\common</Filter>
    91     </ClInclude>
    9286    <ClInclude Include="..\..\common\Common.h">
    9387      <Filter>Header Files\common</Filter>
  • client/Client/RadioButtonList.cpp

    r365e156 r49da01a  
    6565   return this->selectedButton;
    6666}
     67
     68void RadioButtonList::setSelectedButton(int b) {
     69   this->selectedButton = b;
     70}
  • client/Client/RadioButtonList.h

    r365e156 r49da01a  
    2626   void addRadioButton(string s);
    2727   int getSelectedButton();
     28   void setSelectedButton(int b);
    2829};
    2930
  • client/Client/main.cpp

    r365e156 r49da01a  
    232232   cout << "Created main screen" << endl;
    233233
    234    wndCurrent = wndLogin;
     234   goToLoginScreen();
    235235 
    236236   event_queue = al_create_event_queue();
     
    398398         chatConsole.draw(font, al_map_rgb(255,255,255));
    399399
    400          // There should be label gui components that show these or each textbox should have a label
    401          if(wndCurrent == wndLogin || wndCurrent == wndRegister) {
    402             //al_draw_text(font, al_map_rgb(0, 255, 0), 416, 43, ALLEGRO_ALIGN_LEFT, "Username:");
    403             //al_draw_text(font, al_map_rgb(0, 255, 0), 413, 73, ALLEGRO_ALIGN_LEFT, "Password:");
    404          }
    405          else if(wndCurrent == wndMain) {
     400         if(wndCurrent == wndMain) {
    406401            al_draw_text(font, al_map_rgb(0, 255, 0), 4, 43, ALLEGRO_ALIGN_LEFT, "Message:");
    407402
     
    645640                  cout << "Logged out" << endl;
    646641                  state = STATE_START;
    647                   wndCurrent = wndLogin;
     642                  goToLoginScreen();
    648643               }
    649644
     
    914909void goToRegisterScreen()
    915910{
    916    wndCurrent = wndRegister;
    917 
    918911   txtUsernameRegister->clear();
    919912   txtPasswordRegister->clear();
     913   lblRegisterStatus->setText("");
     914   rblClasses->setSelectedButton(-1);
     915
     916   wndCurrent = wndRegister;
    920917}
    921918
    922919void goToLoginScreen()
    923920{
    924    wndCurrent = wndLogin;
    925 
    926921   txtUsername->clear();
    927922   txtPassword->clear();
     923   lblLoginStatus->setText("");
     924
     925   wndCurrent = wndLogin;
    928926}
    929927
Note: See TracChangeset for help on using the changeset viewer.