Changeset 7236 for code/branches/consolecommands3/src/orxonox
- Timestamp:
- Aug 28, 2010, 1:51:04 AM (14 years ago)
- Location:
- code/branches/consolecommands3/src/orxonox
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/consolecommands3/src/orxonox/ChatInputHandler.cc
r7219 r7236 46 46 47 47 /* add commands to console */ 48 _SetConsoleCommand( "startchat", &ChatInputHandler::activate_static );49 _SetConsoleCommand( "startchat_small", &ChatInputHandler::activate_small_static );48 SetConsoleCommand( "startchat", &ChatInputHandler::activate_static ); 49 SetConsoleCommand( "startchat_small", &ChatInputHandler::activate_small_static ); 50 50 51 51 /* constructor */ -
code/branches/consolecommands3/src/orxonox/Test.cc
r7219 r7236 38 38 CreateFactory ( Test ); 39 39 40 _SetConsoleCommand("Test", "printV1", &Test::printV1).addShortcut();41 _SetConsoleCommand("Test", "printV2", &Test::printV2).addShortcut();42 _SetConsoleCommand("Test", "printV3", &Test::printV3).addShortcut();43 _SetConsoleCommand("Test", "printV4", &Test::printV4).addShortcut();44 _SetConsoleCommand("Test", "call", &Test::call).addShortcut();45 _SetConsoleCommand("Test", "call2", &Test::call2).addShortcut();40 SetConsoleCommand("Test", "printV1", &Test::printV1).addShortcut(); 41 SetConsoleCommand("Test", "printV2", &Test::printV2).addShortcut(); 42 SetConsoleCommand("Test", "printV3", &Test::printV3).addShortcut(); 43 SetConsoleCommand("Test", "printV4", &Test::printV4).addShortcut(); 44 SetConsoleCommand("Test", "call", &Test::call).addShortcut(); 45 SetConsoleCommand("Test", "call2", &Test::call2).addShortcut(); 46 46 47 47 -
code/branches/consolecommands3/src/orxonox/controllers/ArtificialController.cc
r7219 r7236 47 47 namespace orxonox 48 48 { 49 _SetConsoleCommand("ArtificialController", "formationflight", &ArtificialController::formationflight);50 _SetConsoleCommand("ArtificialController", "masteraction", &ArtificialController::masteraction);51 _SetConsoleCommand("ArtificialController", "followme", &ArtificialController::followme);52 _SetConsoleCommand("ArtificialController", "passivebehaviour", &ArtificialController::passivebehaviour);53 _SetConsoleCommand("ArtificialController", "formationsize", &ArtificialController::formationsize);49 SetConsoleCommand("ArtificialController", "formationflight", &ArtificialController::formationflight); 50 SetConsoleCommand("ArtificialController", "masteraction", &ArtificialController::masteraction); 51 SetConsoleCommand("ArtificialController", "followme", &ArtificialController::followme); 52 SetConsoleCommand("ArtificialController", "passivebehaviour", &ArtificialController::passivebehaviour); 53 SetConsoleCommand("ArtificialController", "formationsize", &ArtificialController::formationsize); 54 54 55 55 static const unsigned int STANDARD_MAX_FORMATION_SIZE = 7; -
code/branches/consolecommands3/src/orxonox/controllers/HumanController.cc
r7219 r7236 40 40 namespace orxonox 41 41 { 42 _SetConsoleCommand("HumanController", "moveFrontBack", &HumanController::moveFrontBack ).addShortcut().setAsInputCommand();43 _SetConsoleCommand("HumanController", "moveRightLeft", &HumanController::moveRightLeft ).addShortcut().setAsInputCommand();44 _SetConsoleCommand("HumanController", "moveUpDown", &HumanController::moveUpDown ).addShortcut().setAsInputCommand();45 _SetConsoleCommand("HumanController", "rotateYaw", &HumanController::rotateYaw ).addShortcut().setAsInputCommand();46 _SetConsoleCommand("HumanController", "rotatePitch", &HumanController::rotatePitch ).addShortcut().setAsInputCommand();47 _SetConsoleCommand("HumanController", "rotateRoll", &HumanController::rotateRoll ).addShortcut().setAsInputCommand();48 _SetConsoleCommand("HumanController", "fire", &HumanController::fire ).addShortcut().keybindMode(KeybindMode::OnHold);49 _SetConsoleCommand("HumanController", "reload", &HumanController::reload ).addShortcut();50 _SetConsoleCommand("HumanController", "boost", &HumanController::boost ).addShortcut().keybindMode(KeybindMode::OnHold);51 _SetConsoleCommand("HumanController", "greet", &HumanController::greet ).addShortcut();52 _SetConsoleCommand("HumanController", "switchCamera", &HumanController::switchCamera ).addShortcut();53 _SetConsoleCommand("HumanController", "mouseLook", &HumanController::mouseLook ).addShortcut();54 _SetConsoleCommand("HumanController", "suicide", &HumanController::suicide ).addShortcut();55 _SetConsoleCommand("HumanController", "toggleGodMode", &HumanController::toggleGodMode ).addShortcut();56 _SetConsoleCommand("HumanController", "addBots", &HumanController::addBots ).addShortcut().defaultValues(1);57 _SetConsoleCommand("HumanController", "killBots", &HumanController::killBots ).addShortcut().defaultValues(0);58 _SetConsoleCommand("HumanController", "dropItems", &HumanController::dropItems ).addShortcut();59 _SetConsoleCommand("HumanController", "useItem", &HumanController::useItem ).addShortcut();60 _SetConsoleCommand("HumanController", "cycleNavigationFocus", &HumanController::cycleNavigationFocus).addShortcut();61 _SetConsoleCommand("HumanController", "releaseNavigationFocus", &HumanController::releaseNavigationFocus).addShortcut();42 SetConsoleCommand("HumanController", "moveFrontBack", &HumanController::moveFrontBack ).addShortcut().setAsInputCommand(); 43 SetConsoleCommand("HumanController", "moveRightLeft", &HumanController::moveRightLeft ).addShortcut().setAsInputCommand(); 44 SetConsoleCommand("HumanController", "moveUpDown", &HumanController::moveUpDown ).addShortcut().setAsInputCommand(); 45 SetConsoleCommand("HumanController", "rotateYaw", &HumanController::rotateYaw ).addShortcut().setAsInputCommand(); 46 SetConsoleCommand("HumanController", "rotatePitch", &HumanController::rotatePitch ).addShortcut().setAsInputCommand(); 47 SetConsoleCommand("HumanController", "rotateRoll", &HumanController::rotateRoll ).addShortcut().setAsInputCommand(); 48 SetConsoleCommand("HumanController", "fire", &HumanController::fire ).addShortcut().keybindMode(KeybindMode::OnHold); 49 SetConsoleCommand("HumanController", "reload", &HumanController::reload ).addShortcut(); 50 SetConsoleCommand("HumanController", "boost", &HumanController::boost ).addShortcut().keybindMode(KeybindMode::OnHold); 51 SetConsoleCommand("HumanController", "greet", &HumanController::greet ).addShortcut(); 52 SetConsoleCommand("HumanController", "switchCamera", &HumanController::switchCamera ).addShortcut(); 53 SetConsoleCommand("HumanController", "mouseLook", &HumanController::mouseLook ).addShortcut(); 54 SetConsoleCommand("HumanController", "suicide", &HumanController::suicide ).addShortcut(); 55 SetConsoleCommand("HumanController", "toggleGodMode", &HumanController::toggleGodMode ).addShortcut(); 56 SetConsoleCommand("HumanController", "addBots", &HumanController::addBots ).addShortcut().defaultValues(1); 57 SetConsoleCommand("HumanController", "killBots", &HumanController::killBots ).addShortcut().defaultValues(0); 58 SetConsoleCommand("HumanController", "dropItems", &HumanController::dropItems ).addShortcut(); 59 SetConsoleCommand("HumanController", "useItem", &HumanController::useItem ).addShortcut(); 60 SetConsoleCommand("HumanController", "cycleNavigationFocus", &HumanController::cycleNavigationFocus).addShortcut(); 61 SetConsoleCommand("HumanController", "releaseNavigationFocus", &HumanController::releaseNavigationFocus).addShortcut(); 62 62 63 63 CreateUnloadableFactory(HumanController); -
code/branches/consolecommands3/src/orxonox/controllers/NewHumanController.cc
r7219 r7236 49 49 namespace orxonox 50 50 { 51 _SetConsoleCommand("NewHumanController", "changeMode", &NewHumanController::changeMode).keybindMode(KeybindMode::OnPress);52 _SetConsoleCommand("NewHumanController", "accelerate", &NewHumanController::accelerate).keybindMode(KeybindMode::OnPress);53 _SetConsoleCommand("NewHumanController", "decelerate", &NewHumanController::decelerate).keybindMode(KeybindMode::OnPress);54 _SetConsoleCommand("NewHumanController", "unfire", &NewHumanController::unfire ).keybindMode(KeybindMode::OnRelease).addShortcut();51 SetConsoleCommand("NewHumanController", "changeMode", &NewHumanController::changeMode).keybindMode(KeybindMode::OnPress); 52 SetConsoleCommand("NewHumanController", "accelerate", &NewHumanController::accelerate).keybindMode(KeybindMode::OnPress); 53 SetConsoleCommand("NewHumanController", "decelerate", &NewHumanController::decelerate).keybindMode(KeybindMode::OnPress); 54 SetConsoleCommand("NewHumanController", "unfire", &NewHumanController::unfire ).keybindMode(KeybindMode::OnRelease).addShortcut(); 55 55 56 56 CreateUnloadableFactory(NewHumanController); -
code/branches/consolecommands3/src/orxonox/gamestates/GSMainMenu.cc
r7233 r7236 55 55 static const std::string __CC_setMainMenuSoundPath_name = "setMMSoundPath"; 56 56 57 _SetConsoleCommand(__CC_startStandalone_name, &GSMainMenu::startStandalone).deactivate();58 _SetConsoleCommand(__CC_startServer_name, &GSMainMenu::startServer ).deactivate();59 _SetConsoleCommand(__CC_startClient_name, &GSMainMenu::startClient ).deactivate();60 _SetConsoleCommand(__CC_startDedicated_name, &GSMainMenu::startDedicated ).deactivate();61 _SetConsoleCommand(__CC_startMainMenu_name, &GSMainMenu::startMainMenu ).deactivate();62 _SetConsoleCommand(__CC_setMainMenuSoundPath_name, &GSMainMenu::setMainMenuSoundPath).hide();57 SetConsoleCommand(__CC_startStandalone_name, &GSMainMenu::startStandalone).deactivate(); 58 SetConsoleCommand(__CC_startServer_name, &GSMainMenu::startServer ).deactivate(); 59 SetConsoleCommand(__CC_startClient_name, &GSMainMenu::startClient ).deactivate(); 60 SetConsoleCommand(__CC_startDedicated_name, &GSMainMenu::startDedicated ).deactivate(); 61 SetConsoleCommand(__CC_startMainMenu_name, &GSMainMenu::startMainMenu ).deactivate(); 62 SetConsoleCommand(__CC_setMainMenuSoundPath_name, &GSMainMenu::setMainMenuSoundPath).hide(); 63 63 64 64 GSMainMenu::GSMainMenu(const GameStateInfo& info) … … 103 103 InputManager::getInstance().enterState("MainMenuHackery"); 104 104 105 _ModifyConsoleCommand(__CC_startStandalone_name).activate();106 _ModifyConsoleCommand(__CC_startServer_name ).activate();107 _ModifyConsoleCommand(__CC_startClient_name ).activate();108 _ModifyConsoleCommand(__CC_startDedicated_name ).activate();109 _ModifyConsoleCommand(__CC_startMainMenu_name ).activate();110 _ModifyConsoleCommand(__CC_setMainMenuSoundPath_name).setObject(this);105 ModifyConsoleCommand(__CC_startStandalone_name).activate(); 106 ModifyConsoleCommand(__CC_startServer_name ).activate(); 107 ModifyConsoleCommand(__CC_startClient_name ).activate(); 108 ModifyConsoleCommand(__CC_startDedicated_name ).activate(); 109 ModifyConsoleCommand(__CC_startMainMenu_name ).activate(); 110 ModifyConsoleCommand(__CC_setMainMenuSoundPath_name).setObject(this); 111 111 112 112 KeyBinderManager::getInstance().setToDefault(); … … 135 135 GraphicsManager::getInstance().setCamera(0); 136 136 137 _ModifyConsoleCommand(__CC_startStandalone_name).deactivate();138 _ModifyConsoleCommand(__CC_startServer_name ).deactivate();139 _ModifyConsoleCommand(__CC_startClient_name ).deactivate();140 _ModifyConsoleCommand(__CC_startDedicated_name ).deactivate();141 _ModifyConsoleCommand(__CC_startMainMenu_name ).deactivate();142 _ModifyConsoleCommand(__CC_setMainMenuSoundPath_name).setObject(0);137 ModifyConsoleCommand(__CC_startStandalone_name).deactivate(); 138 ModifyConsoleCommand(__CC_startServer_name ).deactivate(); 139 ModifyConsoleCommand(__CC_startClient_name ).deactivate(); 140 ModifyConsoleCommand(__CC_startDedicated_name ).deactivate(); 141 ModifyConsoleCommand(__CC_startMainMenu_name ).deactivate(); 142 ModifyConsoleCommand(__CC_setMainMenuSoundPath_name).setObject(0); 143 143 } 144 144 -
code/branches/consolecommands3/src/orxonox/gamestates/GSRoot.cc
r7233 r7236 45 45 static const std::string __CC_pause_name = "pause"; 46 46 47 _SetConsoleCommand("printObjects", &GSRoot::printObjects).hide();48 _SetConsoleCommand(__CC_setTimeFactor_name, &GSRoot::setTimeFactor).accessLevel(AccessLevel::Master).defaultValues(1.0);49 _SetConsoleCommand(__CC_pause_name, &GSRoot::pause ).accessLevel(AccessLevel::Master);47 SetConsoleCommand("printObjects", &GSRoot::printObjects).hide(); 48 SetConsoleCommand(__CC_setTimeFactor_name, &GSRoot::setTimeFactor).accessLevel(AccessLevel::Master).defaultValues(1.0); 49 SetConsoleCommand(__CC_pause_name, &GSRoot::pause ).accessLevel(AccessLevel::Master); 50 50 51 51 registerStaticNetworkFunction(&TimeFactorListener::setTimeFactor); … … 82 82 TimeFactorListener::setTimeFactor(1.0f); 83 83 84 _ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(this);85 _ModifyConsoleCommand(__CC_pause_name).setObject(this);84 ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(this); 85 ModifyConsoleCommand(__CC_pause_name).setObject(this); 86 86 } 87 87 88 88 void GSRoot::deactivate() 89 89 { 90 _ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(0);91 _ModifyConsoleCommand(__CC_pause_name).setObject(0);90 ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(0); 91 ModifyConsoleCommand(__CC_pause_name).setObject(0); 92 92 } 93 93 -
code/branches/consolecommands3/src/orxonox/overlays/InGameConsole.cc
r7219 r7236 58 58 const float CHAR_WIDTH = 7.45f; // fix this please - determine the char-width dynamically 59 59 60 _SetConsoleCommand("InGameConsole", "openConsole", &InGameConsole::openConsole).addShortcut();61 _SetConsoleCommand("InGameConsole", "closeConsole", &InGameConsole::closeConsole).addShortcut();60 SetConsoleCommand("InGameConsole", "openConsole", &InGameConsole::openConsole).addShortcut(); 61 SetConsoleCommand("InGameConsole", "closeConsole", &InGameConsole::closeConsole).addShortcut(); 62 62 63 63 ManageScopedSingleton(InGameConsole, ScopeID::Graphics, false); -
code/branches/consolecommands3/src/orxonox/overlays/OrxonoxOverlay.cc
r7219 r7236 57 57 std::map<std::string, OrxonoxOverlay*> OrxonoxOverlay::overlays_s; 58 58 59 _SetConsoleCommand("OrxonoxOverlay", "scaleOverlay", &OrxonoxOverlay::scaleOverlay);60 _SetConsoleCommand("OrxonoxOverlay", "scrollOverlay", &OrxonoxOverlay::scrollOverlay);61 _SetConsoleCommand("OrxonoxOverlay", "toggleVisibility", &OrxonoxOverlay::toggleVisibility);62 _SetConsoleCommand("OrxonoxOverlay", "rotateOverlay", &OrxonoxOverlay::rotateOverlay);59 SetConsoleCommand("OrxonoxOverlay", "scaleOverlay", &OrxonoxOverlay::scaleOverlay); 60 SetConsoleCommand("OrxonoxOverlay", "scrollOverlay", &OrxonoxOverlay::scrollOverlay); 61 SetConsoleCommand("OrxonoxOverlay", "toggleVisibility", &OrxonoxOverlay::toggleVisibility); 62 SetConsoleCommand("OrxonoxOverlay", "rotateOverlay", &OrxonoxOverlay::rotateOverlay); 63 63 64 64 OrxonoxOverlay::OrxonoxOverlay(BaseObject* creator) -
code/branches/consolecommands3/src/orxonox/overlays/OverlayGroup.cc
r7219 r7236 43 43 CreateFactory(OverlayGroup); 44 44 45 _SetConsoleCommand("OverlayGroup", "toggleVisibility", &OverlayGroup::toggleVisibility);46 _SetConsoleCommand("OverlayGroup", "scaleGroup", &OverlayGroup::scaleGroup);47 _SetConsoleCommand("OverlayGroup", "scrollGroup", &OverlayGroup::scrollGroup);45 SetConsoleCommand("OverlayGroup", "toggleVisibility", &OverlayGroup::toggleVisibility); 46 SetConsoleCommand("OverlayGroup", "scaleGroup", &OverlayGroup::scaleGroup); 47 SetConsoleCommand("OverlayGroup", "scrollGroup", &OverlayGroup::scrollGroup); 48 48 49 49 OverlayGroup::OverlayGroup(BaseObject* creator)
Note: See TracChangeset
for help on using the changeset viewer.