Changeset 9059 in orxonox.OLD for trunk/src/util
- Timestamp:
- Jul 3, 2006, 6:30:42 PM (18 years ago)
- Location:
- trunk/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/multiplayer_team_deathmatch.cc
r9008 r9059 83 83 subscribeEvent( ES_GAME, SDLK_TAB ); 84 84 subscribeEvent( ES_GAME, SDLK_F1 ); 85 subscribeEvent( ES_MENU, SDLK_F1 );86 85 subscribeEvent( ES_MENU, KeyMapper::PEV_FIRE1 ); 87 86 88 this->notifier = new OrxGui::GLGuiNotifier();89 this->notifier->show();90 this->notifier->setAbsCoor2D(5, 30);91 this->notifier->setFadeAge( 6.0 );92 this->notifier->setHideAge( 8.0 );93 87 this->input = new OrxGui::GLGuiInputLine(); 94 88 this->input->setAbsCoor2D(180, 5); … … 104 98 unsubscribeEvent( ES_GAME, SDLK_TAB ); 105 99 unsubscribeEvent( ES_GAME, SDLK_F1 ); 106 unsubscribeEvent( ES_MENU, SDLK_F1 );107 100 unsubscribeEvent( ES_MENU, KeyMapper::PEV_FIRE1 ); 108 109 if ( this->notifier )110 {111 delete this->notifier;112 this->notifier = NULL;113 }114 101 115 102 if ( this->input ) … … 308 295 309 296 if ( team == 0 || team == 1 ) 310 return CL_ SPACE_SHIP;297 return CL_FPS_PLAYER; 311 298 312 299 assert( false ); … … 316 303 { 317 304 if ( team == 0 ) 318 return "models/ ships/reap_#.obj";305 return "models/creatures/doom_guy.md2"; 319 306 else if ( team == 1 ) 320 return "models/ ships/fighter.obj";307 return "models/creatures/doom_guy.md2"; 321 308 else 322 309 return ""; … … 545 532 } else if ( event.type == SDLK_F1 ) 546 533 { 534 if ( this->statsBox && !this->bLocalPlayerDead && event.bPressed ) 535 { 536 PRINTF(0)("hide stats\n"); 537 this->hideStats(); 538 } 547 539 if ( !this->statsBox && event.bPressed ) 548 540 { 549 541 PRINTF(0)("show stats\n"); 550 542 this->showStats(); 551 }552 if ( this->statsBox && !this->bLocalPlayerDead && event.bPressed && this->table->rowCount() != 0 && this->table->columnCount() != 0 )553 {554 PRINTF(0)("hide stats\n");555 this->hideStats();556 543 } 557 544 } … … 597 584 598 585 PRINTF(0)("CHATMESSAGE %s (%d): %s\n", name.c_str(), userId, message.c_str() ); 599 notifier->pushNotifyMessage(name + ": " + message);586 State::getPlayer()->hud().notifyUser(name + ": " + message); 600 587 } 601 588 … … 624 611 void MultiplayerTeamDeathmatch::showStats( ) 625 612 { 626 EventHandler::getInstance()->pushState( ES_MENU );627 613 statsBox = new OrxGui::GLGuiBox(); 628 614 statsBox->setAbsCoor2D( 300, 100 ); 629 615 630 this->table = new OrxGui::GLGuiTable( 0,0);616 this->table = new OrxGui::GLGuiTable(5,5); 631 617 632 618 statsBox->pack( this->table ); … … 645 631 statsBox = NULL; 646 632 } 647 648 EventHandler::getInstance()->popState();649 633 } 650 634 -
trunk/src/util/multiplayer_team_deathmatch.h
r9008 r9059 83 83 OrxGui::GLGuiBox* box; 84 84 85 OrxGui::GLGuiNotifier* notifier;86 85 OrxGui::GLGuiInputLine* input; 87 86
Note: See TracChangeset
for help on using the changeset viewer.