Changeset 1413 for code/branches
- Timestamp:
- May 24, 2008, 8:12:20 PM (16 years ago)
- Location:
- code/branches/network
- Files:
-
- 1 added
- 1 deleted
- 12 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/core/CMakeLists.txt
r1224 r1413 12 12 IdentifierDistributor.cc 13 13 InputBuffer.cc 14 InputHandler.cc15 14 InputManager.cc 15 KeyBinder.cc 16 16 Language.cc 17 17 Loader.cc -
code/branches/network/src/core/ConfigFileManager.cc
r1056 r1413 336 336 337 337 COUT(4) << "Saved config file \"" << this->filename_ << "\"." << std::endl; 338 } 339 340 void ConfigFile::save(const std::string& filename) 341 { 342 std::string temp = this->filename_; 343 this->filename_ = filename; 344 this->save(); 345 this->filename_ = temp; 338 346 } 339 347 … … 473 481 } 474 482 483 void ConfigFileManager::save(ConfigFileType type, const std::string& filename) 484 { 485 this->getFile(type)->save(filename); 486 } 487 475 488 void ConfigFileManager::clean(ConfigFileType type, bool bCleanComments) 476 489 { -
code/branches/network/src/core/ConfigFileManager.h
r1116 r1413 222 222 void load(bool bCreateIfNotExisting = true); 223 223 void save() const; 224 void save(const std::string& filename); 224 225 void clean(bool bCleanComments = false); 225 226 … … 265 266 void load(ConfigFileType type, bool bCreateIfNotExisting = true); 266 267 void save(ConfigFileType type); 268 void save(ConfigFileType type, const std::string& filename); 267 269 void clean(ConfigFileType type, bool bCleanComments = false); 268 270 -
code/branches/network/src/core/CorePrereqs.h
r1349 r1413 161 161 class JoyStickHandler; 162 162 class KeyBinder; 163 class Key Handler;163 class KeyDetector; 164 164 class MouseHandler; 165 165 -
code/branches/network/src/core/InputBuffer.cc
r1349 r1413 177 177 * @param dt Delta time 178 178 */ 179 void InputBuffer::tick (float dt)179 void InputBuffer::tickInput(float dt, const HandlerState& state) 180 180 { 181 181 timeSinceKeyPressed_ += dt; -
code/branches/network/src/core/InputBuffer.h
r1349 r1413 106 106 void processKey (const KeyEvent &e); 107 107 108 void tick (float dt);108 void tickInput(float dt, const HandlerState& state); 109 109 110 110 private: // variables -
code/branches/network/src/core/InputInterfaces.h
r1349 r1413 254 254 std::vector<Vector3> mVectors; 255 255 };*/ 256 257 /** 258 * Helper struct to determine which handlers of an object (can implement 259 * multiple handlers) are active. 260 */ 261 struct HandlerState 262 { 263 HandlerState() : key(false), mouse(false), joyStick(false) { } 264 bool key; 265 bool mouse; 266 bool joyStick; 267 }; 256 268 257 269 class _CoreExport InputTickable … … 259 271 public: 260 272 virtual ~InputTickable() { } 261 virtual void tick (float dt) = 0;273 virtual void tickInput(float dt, const HandlerState& state) = 0; 262 274 }; 263 275 … … 272 284 virtual void keyReleased(const KeyEvent& evt) = 0; 273 285 virtual void keyHeld (const KeyEvent& evt) = 0; 286 //virtual void tickKey (float dt) { } 274 287 }; 275 288 … … 286 299 virtual void mouseMoved (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize) = 0; 287 300 virtual void mouseScrolled (int abs, int rel) = 0; 301 //virtual void tickMouse (float dt) { } 288 302 }; 289 303 … … 301 315 virtual void joyStickAxisMoved (int joyStickID, int axis, int value) = 0; 302 316 //virtual bool joyStickVector3Moved (int joyStickID, int index /*, fill list*/) {return true;} 317 //virtual void tickJoyStick (float dt) { } 303 318 }; 304 319 -
code/branches/network/src/core/InputManager.cc
r1398 r1413 37 37 #include "Debug.h" 38 38 #include "InputBuffer.h" 39 #include " InputHandler.h"39 #include "KeyBinder.h" 40 40 41 41 namespace orxonox … … 52 52 InputManager::InputManager() : 53 53 inputSystem_(0), keyboard_(0), mouse_(0), 54 keyBinder_(0), buffer_(0), 54 55 joySticksSize_(0), 55 56 state_(IS_UNINIT), stateRequest_(IS_UNINIT), … … 144 145 145 146 // InputManager holds the input buffer --> create one and add it. 146 addKeyHandler(new InputBuffer(), "buffer"); 147 148 KeyBinder* binder = new KeyBinder(); 149 binder->loadBindings(); 150 addKeyHandler(binder, "keybinder"); 151 addMouseHandler(binder, "keybinder"); 152 addJoyStickHandler(binder, "keybinder"); 153 154 // Read all the key bindings and assign them 155 //if (!_loadBindings()) 156 // return false; 147 buffer_ = new InputBuffer(); 148 addKeyHandler(buffer_, "buffer"); 149 150 keyBinder_ = new KeyBinder(); 151 keyBinder_->loadBindings(); 152 addKeyHandler(keyBinder_, "keybinder"); 153 addMouseHandler(keyBinder_, "keybinder"); 154 addJoyStickHandler(keyBinder_, "keybinder"); 155 156 keyDetector_ = new KeyDetector(); 157 keyDetector_->loadBindings(); 158 addKeyHandler(keyDetector_, "keydetector"); 159 addMouseHandler(keyDetector_, "keydetector"); 160 addJoyStickHandler(keyDetector_, "keydetector"); 157 161 158 162 CCOUT(ORX_DEBUG) << "Initialising complete." << std::endl; … … 288 292 CCOUT(ORX_DEBUG) << "Destroying ..." << std::endl; 289 293 290 if (keyHandlers_.find("buffer") != keyHandlers_.end()) 291 delete keyHandlers_["buffer"]; 292 293 if (keyHandlers_.find("keybinder") != keyHandlers_.end()) 294 delete keyHandlers_["keybinder"]; 294 if (buffer_) 295 delete buffer_; 296 297 if (keyBinder_) 298 delete keyBinder_; 299 300 if (keyDetector_) 301 delete keyDetector_; 295 302 296 303 keyHandlers_.clear(); … … 361 368 void InputManager::_updateTickables() 362 369 { 363 // we can use a setto have a list of unique pointers (an object can implement all 3 handlers)364 std:: set<InputTickable*> tempSet;370 // we can use a map to have a list of unique pointers (an object can implement all 3 handlers) 371 std::map<InputTickable*, HandlerState> tempSet; 365 372 for (unsigned int iHandler = 0; iHandler < activeKeyHandlers_.size(); iHandler++) 366 tempSet .insert(activeKeyHandlers_[iHandler]);373 tempSet[activeKeyHandlers_[iHandler]].joyStick = true; 367 374 for (unsigned int iHandler = 0; iHandler < activeMouseHandlers_.size(); iHandler++) 368 tempSet .insert(activeMouseHandlers_[iHandler]);375 tempSet[activeMouseHandlers_[iHandler]].mouse = true; 369 376 for (unsigned int iJoyStick = 0; iJoyStick < joySticksSize_; iJoyStick++) 370 377 for (unsigned int iHandler = 0; iHandler < activeJoyStickHandlers_[iJoyStick].size(); iHandler++) 371 tempSet .insert(activeJoyStickHandlers_[iJoyStick][iHandler]);372 373 // copy the content of the setback to the actual vector378 tempSet[activeJoyStickHandlers_[iJoyStick][iHandler]].joyStick = true; 379 380 // copy the content of the map back to the actual vector 374 381 activeHandlers_.clear(); 375 for (std::set<InputTickable*>::const_iterator itHandler = tempSet.begin(); itHandler != tempSet.end(); itHandler++) 376 activeHandlers_.push_back(*itHandler); 382 for (std::map<InputTickable*, HandlerState>::const_iterator itHandler = tempSet.begin(); 383 itHandler != tempSet.end(); itHandler++) 384 activeHandlers_.push_back(std::pair<InputTickable*, HandlerState>((*itHandler).first, (*itHandler).second)); 377 385 } 378 386 … … 422 430 break; 423 431 432 case IS_DETECTION: 433 if (mouse_) 434 mouse_->capture(); 435 if (keyboard_) 436 keyboard_->capture(); 437 for (unsigned int i = 0; i < joySticksSize_; i++) 438 joySticks_[i]->capture(); 439 440 lastStroke_ = ""; 441 enableKeyHandler("keydetector"); 442 enableMouseHandler("keydetector"); 443 enableJoyStickHandler("keydetector", 0); 444 break; 445 424 446 default: 425 447 break; … … 455 477 456 478 457 // call the ticks 479 // call the ticks for the handlers (need to be treated specially) 458 480 for (unsigned int iHandler = 0; iHandler < activeHandlers_.size(); iHandler++) 459 activeHandlers_[iHandler]->tick(dt); 481 activeHandlers_[iHandler].first->tickInput(dt, activeHandlers_[iHandler].second); 482 483 /*for (unsigned int iHandler = 0; iHandler < activeKeyHandlers_.size(); iHandler++) 484 activeKeyHandlers_[iHandler]->tickKey(dt); 485 for (unsigned int iHandler = 0; iHandler < activeMouseHandlers_.size(); iHandler++) 486 activeMouseHandlers_[iHandler]->tickMouse(dt); 487 for (unsigned int iJoyStick = 0; iJoyStick < joySticksSize_; iJoyStick++) 488 for (unsigned int iHandler = 0; iHandler < activeJoyStickHandlers_[iJoyStick].size(); iHandler++) 489 activeJoyStickHandlers_[iJoyStick][iHandler]->tickJoyStick(dt);*/ 460 490 } 461 491 … … 781 811 } 782 812 783 bool InputManager::isKeyDown(KeyCode::Enum key)813 /*bool InputManager::isKeyDown(KeyCode::Enum key) 784 814 { 785 815 if (_getSingleton().keyboard_) … … 787 817 else 788 818 return false; 789 } 790 791 bool InputManager::isModifierDown(KeyboardModifier::Enum modifier)819 }*/ 820 821 /*bool InputManager::isModifierDown(KeyboardModifier::Enum modifier) 792 822 { 793 823 if (_getSingleton().keyboard_) … … 795 825 else 796 826 return false; 797 } 827 }*/ 798 828 799 829 /*const MouseState InputManager::getMouseState() … … 812 842 return JoyStickState(); 813 843 }*/ 814 815 844 816 845 void InputManager::destroy() … … 871 900 } 872 901 902 void InputManager::storeKeyStroke(const std::string& name) 903 { 904 if (_getSingleton().lastStroke_ == "") 905 _getSingleton().lastStroke_ = name; 906 } 907 908 const std::string& InputManager::getLastKeyStroke() 909 { 910 return _getSingleton().lastStroke_; 911 } 912 873 913 874 914 // ###### KeyHandler ###### -
code/branches/network/src/core/InputManager.h
r1349 r1413 80 80 enum InputState 81 81 { 82 IS_UNINIT, //!< InputManager has not yet been initialised. 83 IS_NONE, //!< Input is discarded. 84 IS_NORMAL, //!< Normal play state. Key and button bindings are active. 85 IS_GUI, //!< All OIS input events are passed to CEGUI. 86 IS_CONSOLE, //!< Keyboard input is redirected to the InputBuffer. 87 IS_CUSTOM //!< Any possible configuration. 82 IS_UNINIT, //!< InputManager has not yet been initialised. 83 IS_NONE, //!< Input is discarded. 84 IS_NORMAL, //!< Normal play state. Key and button bindings are active. 85 IS_GUI, //!< All OIS input events are passed to CEGUI. 86 IS_CONSOLE, //!< Keyboard input is redirected to the InputBuffer. 87 IS_DETECTION, //!< All the input goes to the KeyDetector 88 IS_CUSTOM //!< Any possible configuration. 88 89 }; 89 90 … … 103 104 static void destroyJoySticks(); 104 105 105 static bool isModifierDown(KeyboardModifier::Enum modifier);106 static bool isKeyDown(KeyCode::Enum key);106 //static bool isModifierDown(KeyboardModifier::Enum modifier); 107 //static bool isKeyDown(KeyCode::Enum key); 107 108 //static const MouseState getMouseState(); 108 109 //static const JoyStickState getJoyStickState(unsigned int ID); … … 112 113 static void setInputState(const InputState state); 113 114 static InputState getInputState(); 115 116 static void storeKeyStroke(const std::string& name); 117 static const std::string& getLastKeyStroke(); 114 118 115 119 static bool addKeyHandler (KeyHandler* handler, const std::string& name); … … 172 176 173 177 private: // variables 174 OIS::InputManager* inputSystem_; //!< OIS input manager175 OIS::Keyboard* keyboard_; //!< OIS mouse176 OIS::Mouse* mouse_; //!< OIS keyboard177 std::vector<OIS::JoyStick*> joySticks_; //!< OIS joy sticks178 OIS::InputManager* inputSystem_; //!< OIS input manager 179 OIS::Keyboard* keyboard_; //!< OIS mouse 180 OIS::Mouse* mouse_; //!< OIS keyboard 181 std::vector<OIS::JoyStick*> joySticks_; //!< OIS joy sticks 178 182 unsigned int joySticksSize_; 183 184 KeyBinder* keyBinder_; //!< KeyBinder instance 185 KeyDetector* keyDetector_; //!< KeyDetector instance 186 InputBuffer* buffer_; //!< InputBuffer instance 179 187 180 188 InputState state_; 181 189 InputState stateRequest_; 182 190 unsigned int keyboardModifiers_; 191 std::string lastStroke_; 183 192 184 193 //! Keeps track of the joy stick POV states … … 194 203 std::vector<MouseHandler*> activeMouseHandlers_; 195 204 std::vector<std::vector<JoyStickHandler*> > activeJoyStickHandlers_; 196 std::vector< InputTickable*>activeHandlers_;205 std::vector<std::pair<InputTickable*, HandlerState> > activeHandlers_; 197 206 198 207 std::vector<Key> keysDown_; -
code/branches/network/src/core/KeyBinder.cc
r1412 r1413 32 32 */ 33 33 34 #include " InputHandler.h"34 #include "KeyBinder.h" 35 35 #include <fstream> 36 36 #include "util/Convert.h" … … 472 472 clearBindings(); 473 473 474 /*std::ifstream infile;474 std::ifstream infile; 475 475 infile.open("keybindings.ini"); 476 476 if (!infile.is_open()) 477 477 { 478 ConfigFileManager::getSingleton()->setFile(CFT_Keybindings, "keybindings_def.ini");479 setConfigValues();480 } 481 infile.close(); */478 ConfigFileManager::getSingleton()->setFile(CFT_Keybindings, keybindingsDefault_); 479 ConfigFileManager::getSingleton()->save(CFT_Keybindings, "keybindings.ini"); 480 } 481 infile.close(); 482 482 ConfigFileManager::getSingleton()->setFile(CFT_Keybindings, "keybindings.ini"); 483 484 // parse key bindings 483 485 setConfigValues(); 484 486 … … 496 498 SetConfigValue(derivePeriod_, 0.1f).description("Accuracy of the mouse input deriver. The higher the more precise, but laggier."); 497 499 SetConfigValue(mouseSensitivityDerived_, 1.0f).description("Mouse sensitivity if mouse input is derived."); 498 SetConfigValue(keybindingsDefault_, " keybindings_def.ini").description("Default ini file for the keybindings.");500 SetConfigValue(keybindingsDefault_, "def_keybindings.ini").description("Default ini file for the keybindings."); 499 501 500 502 float oldThresh = buttonThreshold_; … … 542 544 @brief Overwrites all bindings with "" 543 545 */ 544 void KeyBinder::clearBindings( bool bInit)546 void KeyBinder::clearBindings() 545 547 { 546 548 for (unsigned int i = 0; i < nKeys_s; i++) … … 561 563 } 562 564 563 void KeyBinder::tick (float dt)565 void KeyBinder::tickInput(float dt, const HandlerState& state) 564 566 { 565 567 // we have to process all the analog input since there is e.g. no 'mouseDoesntMove' event. 566 for (unsigned int i = 0; i < nHalfAxes_s; i++) 568 unsigned int iBegin = 8; 569 unsigned int iEnd = 8; 570 if (state.joyStick) 571 iEnd = nHalfAxes_s; 572 if (state.mouse) 573 iBegin = 0; 574 for (unsigned int i = iBegin; i < iEnd; i++) 567 575 { 568 576 if (halfAxes_[i].hasChanged_) … … 596 604 } 597 605 598 if (bDeriveMouseInput_ )606 if (bDeriveMouseInput_ && state.mouse) 599 607 { 600 608 if (deriveTime_ > derivePeriod_) 601 609 { 602 deriveTime_ = 0.0f;603 610 //CCOUT(3) << "mouse abs: "; 604 611 for (int i = 0; i < 2; i++) … … 606 613 if (mouseRelative_[i] > 0) 607 614 { 608 halfAxes_[2*i + 0].absVal_ = mouseRelative_[i] / derive Period_ / 5000* mouseSensitivityDerived_;615 halfAxes_[2*i + 0].absVal_ = mouseRelative_[i] / deriveTime_ * 0.0005 * mouseSensitivityDerived_; 609 616 halfAxes_[2*i + 1].absVal_ = 0.0f; 610 617 } … … 612 619 { 613 620 halfAxes_[2*i + 0].absVal_ = 0.0f; 614 halfAxes_[2*i + 1].absVal_ = -mouseRelative_[i] / derive Period_ / 5000* mouseSensitivityDerived_;621 halfAxes_[2*i + 1].absVal_ = -mouseRelative_[i] / deriveTime_ * 0.0005 * mouseSensitivityDerived_; 615 622 } 616 623 else … … 622 629 mouseRelative_[i] = 0; 623 630 } 631 deriveTime_ = 0.0f; 624 632 //COUT(3) << std::endl; 625 633 } … … 633 641 634 642 // always reset the relative movement of the mouse 635 for (unsigned int i = 0; i < 8; i++) 636 halfAxes_[i].relVal_ = 0.0f; 643 if (state.mouse) 644 for (unsigned int i = 0; i < 8; i++) 645 halfAxes_[i].relVal_ = 0.0f; 637 646 } 638 647 … … 784 793 785 794 // ############################### 786 // ### GUIInputHandler###795 // ##### KeyDetector ##### 787 796 // ############################### 788 797 789 ///** 790 // @brief standard constructor 791 //*/ 792 //GUIInputHandler::GUIInputHandler() 793 //{ 794 //} 795 796 ///** 797 // @brief Destructor 798 //*/ 799 //GUIInputHandler::~GUIInputHandler() 800 //{ 801 //} 802 803 ///** 804 // @brief Event handler for the keyPressed Event. 805 // @param e Event information 806 //*/ 807 //bool GUIInputHandler::keyPressed(const OIS::KeyEvent &e) 808 //{ 809 ////CEGUI::System::getSingleton().injectKeyDown( arg.key ); 810 ////CEGUI::System::getSingleton().injectChar( arg.text ); 811 // return true; 812 //} 813 814 ///** 815 // @brief Event handler for the keyReleased Event. 816 // @param e Event information 817 //*/ 818 //bool GUIInputHandler::keyReleased(const OIS::KeyEvent &e) 819 //{ 820 ////CEGUI::System::getSingleton().injectKeyUp( arg.key ); 821 // return true; 822 //} 823 824 ///** 825 // @brief Event handler for the mouseMoved Event. 826 // @param e Event information 827 //*/ 828 //bool GUIInputHandler::mouseMoved(const OIS::MouseEvent &e) 829 //{ 830 ////CEGUI::System::getSingleton().injectMouseMove( arg.state.X.rel, arg.state.Y.rel ); 831 // return true; 832 //} 833 834 ///** 835 // @brief Event handler for the mousePressed Event. 836 // @param e Event information 837 // @param id The ID of the mouse button 838 //*/ 839 //bool GUIInputHandler::mousePressed(const OIS::MouseEvent &e, OIS::MouseButton id) 840 //{ 841 ////CEGUI::System::getSingleton().injectMouseButtonDown(convertOISMouseButtonToCegui(id)); 842 // return true; 843 //} 844 845 ///** 846 // @brief Event handler for the mouseReleased Event. 847 // @param e Event information 848 // @param id The ID of the mouse button 849 //*/ 850 //bool GUIInputHandler::mouseReleased(const OIS::MouseEvent &e, OIS::MouseButton id) 851 //{ 852 ////CEGUI::System::getSingleton().injectMouseButtonUp(convertOISMouseButtonToCegui(id)); 853 // return true; 854 //} 855 798 /** 799 @brief Constructor 800 */ 801 KeyDetector::KeyDetector() 802 { 803 RegisterObject(KeyDetector); 804 } 805 806 /** 807 @brief Destructor 808 */ 809 KeyDetector::~KeyDetector() 810 { 811 } 812 813 /** 814 @brief Loads the key and button bindings. 815 @return True if loading succeeded. 816 */ 817 void KeyDetector::loadBindings() 818 { 819 clearBindings(); 820 setConfigValues(); 821 } 822 823 /** 824 @brief Loader for the key bindings, managed by config values. 825 */ 826 void KeyDetector::setConfigValues() 827 { 828 // keys 829 for (unsigned int i = 0; i < nKeys_s; i++) 830 readTrigger(keys_[i]); 831 // mouse buttons 832 for (unsigned int i = 0; i < nMouseButtons_s; i++) 833 readTrigger(mouseButtons_[i]); 834 // joy stick buttons 835 for (unsigned int i = 0; i < nJoyStickButtons_s; i++) 836 readTrigger(joyStickButtons_[i]); 837 // half axes 838 for (unsigned int i = 0; i < nHalfAxes_s; i++) 839 readTrigger(halfAxes_[i]); 840 } 841 842 void KeyDetector::readTrigger(Button& button) 843 { 844 // binding has changed 845 button.parse(paramCommandBuffer_); 846 SimpleCommand* cmd = new SimpleCommand(); 847 cmd->evaluation_ = CommandExecutor::evaluate("storeKeyStroke " + button.name_); 848 button.commands_[KeybindMode::OnPress] = new BaseCommand*[1]; 849 button.commands_[KeybindMode::OnPress][0] = cmd; 850 button.nCommands_[KeybindMode::OnPress] = 1; 851 } 856 852 } -
code/branches/network/src/core/KeyBinder.h
r1412 r1413 32 32 */ 33 33 34 #ifndef _ InputHandler_H__35 #define _ InputHandler_H__34 #ifndef _KeyBinder_H__ 35 #define _KeyBinder_H__ 36 36 37 37 #include "CorePrereqs.h" … … 141 141 public: 142 142 KeyBinder (); 143 ~KeyBinder();143 virtual ~KeyBinder(); 144 144 145 145 void loadBindings(); 146 void clearBindings(bool bInit = false); 147 146 void clearBindings(); 148 147 void setConfigValues(); 149 148 150 private: // functions 149 protected: // functions 150 void tickInput(float dt, const HandlerState& state); 151 151 152 void readTrigger(Button& button); 152 153 //static void clearBundle(KeyBindingBundle& bundle, bool bInit);154 //static void redimensionBinding(KeyBinding& binding);155 156 void tick(float dt);157 153 158 154 void keyPressed (const KeyEvent& evt); … … 171 167 void joyStickAxisMoved (int joyStickID, int axis, int value); 172 168 173 pr ivate: // variables169 protected: // variables 174 170 //! denotes the number of different keys there are in OIS. 175 171 static const unsigned int nKeys_s = 0xEE; … … 231 227 232 228 233 /** 234 @brief Captures mouse and keyboard input and distributes it to the 235 GUI. 236 */ 237 //class _CoreExport GUIInputHandler : public KeyHandler, public MouseHandler, public JoyStickHandler 238 //{ 239 //public: 240 // GUIInputHandler (); 241 // ~GUIInputHandler(); 242 243 //private: 244 // // input events 245 //bool keyPressed (const OIS::KeyEvent &arg); 246 //bool keyReleased (const OIS::KeyEvent &arg); 247 //bool keyHeld (const OIS::KeyEvent &arg); 248 249 // bool mousePressed (const OIS::MouseEvent &arg, OIS::MouseButton id); 250 //bool mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButton id); 251 //bool mouseHeld (const OIS::MouseEvent &arg, OIS::MouseButton id); 252 // bool mouseMoved (const OIS::MouseEvent &arg); 253 254 //bool buttonPressed (const OIS::JoyStickEvent &arg, int button); 255 //bool buttonReleased(const OIS::JoyStickEvent &arg, int button); 256 //bool buttonHeld (const OIS::JoyStickEvent &arg, int button); 257 //bool axisMoved (const OIS::JoyStickEvent &arg, int axis); 258 //bool sliderMoved (const OIS::JoyStickEvent &arg, int id); 259 //bool povMoved (const OIS::JoyStickEvent &arg, int id); 260 //}; 261 229 class _CoreExport KeyDetector : public KeyBinder 230 { 231 public: 232 KeyDetector(); 233 ~KeyDetector(); 234 void loadBindings(); 235 void setConfigValues(); 236 protected: 237 void readTrigger(Button& button); 238 }; 262 239 } 263 240 264 #endif /* _InputHandler_H__ */ 241 242 243 244 #endif /* _KeyBinder_H__ */ -
code/branches/network/src/orxonox/Orxonox.cc
r1411 r1413 367 367 ib->registerListener(orxonoxConsole_, &InGameConsole::execute, '\r', false); 368 368 ib->registerListener(orxonoxConsole_, &InGameConsole::hintandcomplete, '\t', true); 369 ib->registerListener(orxonoxConsole_, &InGameConsole::clear, '�', true);369 //ib->registerListener(orxonoxConsole_, &InGameConsole::clear, '§', true); 370 370 ib->registerListener(orxonoxConsole_, &InGameConsole::removeLast, '\b', true); 371 371 ib->registerListener(orxonoxConsole_, &InGameConsole::exit, (char)0x1B, true); … … 517 517 // again, just to be sure ogre works fine 518 518 ogreRoot._fireFrameEnded(evt); 519 //msleep( 100);519 //msleep(50); 520 520 } 521 521 -
code/branches/network/src/orxonox/objects/SpaceShip.cc
r1408 r1413 482 482 { 483 483 SpaceShip* this_ = getLocalShip(); 484 COUT(3) << val << std::endl;485 484 this_->acceleration_.x = this_->translationAcceleration_ * val; 486 485 } -
code/branches/network/visual_studio/vc8/core.vcproj
r1293 r1413 197 197 </File> 198 198 <File 199 RelativePath="..\..\src\core\InputHandler.cc"200 >201 </File>202 <File203 199 RelativePath="..\..\src\core\InputManager.cc" 200 > 201 </File> 202 <File 203 RelativePath="..\..\src\core\KeyBinder.cc" 204 204 > 205 205 </File> … … 347 347 </File> 348 348 <File 349 RelativePath="..\..\src\core\InputHandler.h"350 >351 </File>352 <File353 349 RelativePath="..\..\src\core\InputInterfaces.h" 354 350 > … … 360 356 <File 361 357 RelativePath="..\..\src\core\Iterator.h" 358 > 359 </File> 360 <File 361 RelativePath="..\..\src\core\KeyBinder.h" 362 362 > 363 363 </File>
Note: See TracChangeset
for help on using the changeset viewer.