Changeset 8635 in orxonox.OLD for branches/network/src/util/multiplayer_team_deathmatch.cc
- Timestamp:
- Jun 20, 2006, 3:38:37 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.