Changeset 7891 for code/trunk/src
- Timestamp:
- Feb 14, 2011, 10:30:01 PM (14 years ago)
- Location:
- code/trunk/src/libraries/core/input
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/core/input/Button.cc
r7401 r7891 219 219 } 220 220 } 221 else 222 cmd->setFixedKeybindMode(true); 221 223 } 222 224 else … … 227 229 if (mode == KeybindMode::None) 228 230 mode = eval.getConsoleCommand()->getKeybindMode(); 231 else 232 cmd->setFixedKeybindMode(true); 229 233 230 234 commands[mode].push_back(cmd); -
code/trunk/src/libraries/core/input/InputCommands.h
r7861 r7891 56 56 { 57 57 public: 58 BaseCommand() : bFixedKeybindMode_(false) {} 58 59 virtual ~BaseCommand() { } 60 59 61 virtual bool execute(float abs = 1.0f, float rel = 1.0f) = 0; 60 62 virtual CommandEvaluation* getEvaluation() = 0; 63 64 inline void setFixedKeybindMode(bool fixed) 65 { this->bFixedKeybindMode_ = fixed; } 66 inline bool hasFixedKeybindMode() const 67 { return this->bFixedKeybindMode_; } 68 69 private: 70 bool bFixedKeybindMode_; 61 71 }; 62 72 -
code/trunk/src/libraries/core/input/KeyBinder.cc
r7861 r7891 404 404 for (size_t command_index = 0; command_index < button->nCommands_[mode_index]; ++command_index) 405 405 { 406 if (button->commands_[mode_index][command_index]->hasFixedKeybindMode()) 407 continue; 408 406 409 CommandEvaluation* evaluation = button->commands_[mode_index][command_index]->getEvaluation(); 407 410
Note: See TracChangeset
for help on using the changeset viewer.