Changeset 8635 in orxonox.OLD for branches/network
- Timestamp:
 - Jun 20, 2006, 3:38:37 PM (19 years ago)
 - Location:
 - branches/network/src
 - Files:
 - 
          
- 3 edited
 
- 
          lib/network/message_manager.cc (modified) (1 diff)
 - 
          util/multiplayer_team_deathmatch.cc (modified) (5 diffs)
 - 
          util/multiplayer_team_deathmatch.h (modified) (3 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
        
branches/network/src/lib/network/message_manager.cc
r8623 r8635 328 328 329 329 it->second.messages.push_back( msg ); 330 331 332 330 } 333 331 }  - 
        
branches/network/src/util/multiplayer_team_deathmatch.cc
r8623 r8635 43 43 44 44 #include "story_entity.h" 45 46 #include "shell_command.h" 45 47 46 48 … … 80 82 81 83 subscribeEvent( ES_GAME, SDLK_o ); 84 subscribeEvent( ES_GAME, SDLK_TAB ); 85 86 this->notifier = new OrxGui::GLGuiNotifier(); 87 this->notifier->show(); 88 this->notifier->setAbsCoor2D(5, 30); 89 this->input = new OrxGui::GLGuiInputLine(); 90 this->input->connect(SIGNAL(input, enterPushed), this, SLOT(MultiplayerTeamDeathmatch, onInputEnter)); 82 91 } 83 92 … … 91 100 92 101 unsubscribeEvent( ES_GAME, SDLK_o ); 102 unsubscribeEvent( ES_GAME, SDLK_TAB ); 103 104 if ( this->notifier ) 105 { 106 delete this->notifier; 107 this->notifier = NULL; 108 } 109 110 if ( this->input ) 111 { 112 delete this->input; 113 this->input = NULL; 114 } 93 115 } 94 116 … … 539 561 this->bShowTeamChange = true; 540 562 } 563 else if ( event.type == SDLK_TAB ) 564 { 565 if ( !event.bPressed ) 566 { 567 EventHandler::getInstance()->pushState( ES_MENU ); 568 OrxGui::GLGuiHandler::getInstance()->activateCursor(); 569 OrxGui::GLGuiHandler::getInstance()->deactivateCursor(); 570 input->show(); 571 input->giveFocus(); 572 input->setText("say "); 573 } 574 } 541 575 } 542 576 … … 564 598 565 599 PRINTF(0)("CHATMESSAGE %s: %s\n", name.c_str(), message.c_str() ); 566 } 567 568 569 570 600 notifier->pushNotifyMessage(name + ": " + message); 601 } 602 603 void MultiplayerTeamDeathmatch::onInputEnter( const std::string & text ) 604 { 605 EventHandler::getInstance()->popState(); 606 input->breakFocus(); 607 input->hide(); 608 input->setText(""); 609 610 OrxShell::ShellCommand::execute( text ); 611 } 612 613 614 615  - 
        
branches/network/src/util/multiplayer_team_deathmatch.h
r8623 r8635 13 13 14 14 #include "glgui.h" 15 #include "specials/glgui_notifier.h" 15 16 16 17 class TiXmlElement; … … 82 83 OrxGui::GLGuiBox* box; 83 84 85 OrxGui::GLGuiNotifier* notifier; 86 OrxGui::GLGuiInputLine* input; 87 84 88 void calculateTeamScore(); 85 89 void nextGameState(); … … 94 98 void onButtonCancel(); 95 99 void onButtonExit(); 100 101 void onInputEnter( const std::string & text ); 96 102 }; 97 103  
Note: See TracChangeset
          for help on using the changeset viewer.
      


            






