Changeset 7284 for code/trunk/src/orxonox/gamestates/GSMainMenu.cc
- Timestamp:
- Aug 31, 2010, 3:37:40 AM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/gamestates/GSMainMenu.cc
r6746 r7284 33 33 #include "core/input/KeyBinderManager.h" 34 34 #include "core/Game.h" 35 #include "core/ConsoleCommand.h"36 35 #include "core/ConfigValueIncludes.h" 37 36 #include "core/CoreIncludes.h" 38 37 #include "core/GraphicsManager.h" 39 38 #include "core/GUIManager.h" 39 #include "core/command/ConsoleCommand.h" 40 40 #include "Scene.h" 41 41 #include "sound/AmbientSound.h" … … 48 48 DeclareGameState(GSMainMenu, "mainMenu", false, true); 49 49 50 static const std::string __CC_startStandalone_name = "startGame"; 51 static const std::string __CC_startServer_name = "startServer"; 52 static const std::string __CC_startClient_name = "startClient"; 53 static const std::string __CC_startDedicated_name = "startDedicated"; 54 static const std::string __CC_startMainMenu_name = "startMainMenu"; 55 static const std::string __CC_setMainMenuSoundPath_name = "setMMSoundPath"; 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(); 63 50 64 GSMainMenu::GSMainMenu(const GameStateInfo& info) 51 65 : GameState(info) … … 89 103 InputManager::getInstance().enterState("MainMenuHackery"); 90 104 91 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startStandalone), "startGame")); 92 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startServer), "startServer")); 93 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startClient), "startClient")); 94 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startDedicated), "startDedicated")); 95 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startMainMenu), "startMainMenu")); 96 97 // create command to change sound path 98 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::setMainMenuSoundPath, this), "setMMSoundPath")); 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); 99 111 100 112 KeyBinderManager::getInstance().setToDefault(); … … 122 134 GUIManager::hideGUI("MainMenu"); 123 135 GraphicsManager::getInstance().setCamera(0); 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); 124 143 } 125 144
Note: See TracChangeset
for help on using the changeset viewer.