- Timestamp:
- Nov 15, 2009, 10:40:53 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sound3/src/orxonox/gamestates/GSMainMenu.cc
r6071 r6072 50 50 , inputState_(0) 51 51 { 52 52 RegisterRootObject(GSMainMenu); 53 53 inputState_ = InputManager::getInstance().createInputState("mainMenu"); 54 54 inputState_->setMouseMode(MouseMode::Nonexclusive); … … 93 93 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startMainMenu), "startMainMenu")); 94 94 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startIOConsole), "startIOConsole")); 95 96 97 95 96 // create command to change sound path 97 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::setMainMenuSoundPath, this), "setMMSoundPath")); 98 98 99 99 KeyBinderManager::getInstance().setToDefault(); … … 106 106 } 107 107 108 108 this->setConfigValues(); 109 109 } 110 110 … … 126 126 } 127 127 128 128 void GSMainMenu::setConfigValues() 129 129 { 130 130 SetConfigValue(soundPathMain_, "mainmenu.wav") 131 131 .description("Contains the path to the main menu sound file.") 132 132 .callback(this, &GSMainMenu::reloadSound); 133 133 } 134 134 135 void GSMainMenu::reloadSound() { 136 if (GameMode::playsSound()) 135 void GSMainMenu::reloadSound() 136 { 137 if (GameMode::playsSound()) 137 138 { 138 139 this->ambient_->setAmbientSource(soundPathMain_); 139 140 140 } 141 } 141 142 142 const std::string& GSMainMenu::getMainMenuSoundPath() { 143 return soundPathMain_; 144 } 143 const std::string& GSMainMenu::getMainMenuSoundPath() 144 { 145 return soundPathMain_; 146 } 145 147 146 void GSMainMenu::setMainMenuSoundPath(const std::string& path) { 147 ModifyConfigValue(soundPathMain_, set, path); 148 } 148 void GSMainMenu::setMainMenuSoundPath(const std::string& path) 149 { 150 ModifyConfigValue(soundPathMain_, set, path); 151 } 149 152 150 153 void GSMainMenu::startStandalone()
Note: See TracChangeset
for help on using the changeset viewer.