Changeset 7236 for code/branches/consolecommands3/src/orxonox/gamestates
- Timestamp:
- Aug 28, 2010, 1:51:04 AM (14 years ago)
- Location:
- code/branches/consolecommands3/src/orxonox/gamestates
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.