Changeset 1630 for code/branches/input/src/core/input/KeyDetector.cc
- Timestamp:
- Jun 27, 2008, 10:36:53 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/input/src/core/input/KeyDetector.cc
r1535 r1630 28 28 29 29 /** 30 @file 31 @brief Implementation of the different input handlers. 32 */ 30 @file 31 @brief 32 Implementation of the different input handlers. 33 */ 33 34 34 35 #include "KeyDetector.h" … … 42 43 namespace orxonox 43 44 { 44 /** 45 @brief Constructor 46 */ 47 KeyDetector::KeyDetector() 48 { 49 RegisterObject(KeyDetector); 50 } 45 /** 46 @brief 47 Constructor 48 */ 49 KeyDetector::KeyDetector() 50 { 51 RegisterObject(KeyDetector); 52 } 51 53 52 /** 53 @brief Destructor 54 */ 55 KeyDetector::~KeyDetector() 56 { 57 } 54 /** 55 @brief 56 Destructor 57 */ 58 KeyDetector::~KeyDetector() 59 { 60 } 58 61 59 /** 60 @brief Loads the key and button bindings. 61 @return True if loading succeeded. 62 */ 63 void KeyDetector::loadBindings() 64 { 65 clearBindings(); 66 setConfigValues(); 67 } 62 /** 63 @brief 64 Loads the key and button bindings. 65 @return 66 True if loading succeeded. 67 */ 68 void KeyDetector::loadBindings() 69 { 70 clearBindings(); 71 setConfigValues(); 72 } 68 73 69 void KeyDetector::readTrigger(Button& button)70 {71 SimpleCommand* cmd = new SimpleCommand();72 cmd->evaluation_ = CommandExecutor::evaluate("storeKeyStroke " + button.name_);73 button.commands_[KeybindMode::OnPress] = new BaseCommand*[1];74 button.commands_[KeybindMode::OnPress][0] = cmd;75 button.nCommands_[KeybindMode::OnPress] = 1;76 }74 void KeyDetector::readTrigger(Button& button) 75 { 76 SimpleCommand* cmd = new SimpleCommand(); 77 cmd->evaluation_ = CommandExecutor::evaluate("storeKeyStroke " + button.name_); 78 button.commands_[KeybindMode::OnPress] = new BaseCommand*[1]; 79 button.commands_[KeybindMode::OnPress][0] = cmd; 80 button.nCommands_[KeybindMode::OnPress] = 1; 81 } 77 82 }
Note: See TracChangeset
for help on using the changeset viewer.