Changeset 1934
- Timestamp:
- Oct 15, 2008, 4:03:11 PM (16 years ago)
- Location:
- code/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/core/input/InputManager.cc
r1932 r1934 47 47 #include "core/CommandExecutor.h" 48 48 #include "core/ConsoleCommand.h" 49 #include "core/CommandLine.h" 49 50 #include "util/Debug.h" 50 51 … … 62 63 SetConsoleCommand(InputManager, calibrate, true); 63 64 SetConsoleCommand(InputManager, reload, false); 65 SetCommandLineSwitch(keyboard_no_grab); 64 66 65 67 std::string InputManager::bindingCommmandString_s = ""; … … 153 155 #if defined OIS_LINUX_PLATFORM 154 156 paramList.insert(std::make_pair(std::string("XAutoRepeatOn"), std::string("true"))); 157 paramList.insert(std::make_pair(std::string("x11_mouse_grab"), "true")); 158 paramList.insert(std::make_pair(std::string("x11_mouse_hide"), "true")); 159 bool kbNoGrab; 160 CommandLine::getValue("keyboard_no_grab", &kbNoGrab); 161 if (kbNoGrab) 162 paramList.insert(std::make_pair(std::string("x11_keyboard_grab"), std::string("false"))); 163 else 164 paramList.insert(std::make_pair(std::string("x11_keyboard_grab"), std::string("true"))); 155 165 #endif 156 166 -
code/trunk/src/orxonox/gamestates/GSLevel.cc
r1932 r1934 38 38 #include "core/CommandExecutor.h" 39 39 #include "core/ConsoleCommand.h" 40 #include "core/CommandLine.h" 40 41 #include "core/ConfigValueIncludes.h" 41 42 #include "core/CoreIncludes.h" … … 49 50 namespace orxonox 50 51 { 52 SetCommandLineArgument(level, "sample.oxw").setShortcut("l"); 53 51 54 GSLevel::GSLevel(const std::string& name) 52 55 : GameState<GSGraphics>(name) … … 157 160 // call the loader 158 161 COUT(0) << "Loading level..." << std::endl; 159 startLevel_ = new Level(Settings::getDataPath() + "levels/sample.oxw"); 162 std::string levelName; 163 CommandLine::getValue("level", &levelName); 164 startLevel_ = new Level(Settings::getDataPath() + std::string("levels/") + levelName); 160 165 Loader::open(startLevel_); 161 166 }
Note: See TracChangeset
for help on using the changeset viewer.