Changeset 1066 for code/trunk/src/core/InputBuffer.cc
- Timestamp:
- Apr 14, 2008, 10:50:08 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/core/InputBuffer.cc
r1062 r1066 38 38 InputBuffer::InputBuffer() 39 39 { 40 this->bActivated_ = false;40 //this->bActivated_ = false; 41 41 this->allowedChars_ = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZäöüÄÖÜ0123456789 \\\"().:,;_-+*/=!?<>[|]"; 42 42 this->keyboard_ = InputManager::getSingleton().getKeyboard(); 43 43 this->buffer_ = ""; 44 44 45 this->keyboard_->setEventCallback(this);45 //this->keyboard_->setEventCallback(this); 46 46 } 47 47 /* … … 114 114 } 115 115 116 void InputBuffer::activityChanged() const116 /*void InputBuffer::activityChanged() const 117 117 { 118 } 118 }*/ 119 119 120 120 bool InputBuffer::charIsAllowed(const char& input) … … 128 128 bool InputBuffer::keyPressed(const OIS::KeyEvent &e) 129 129 { 130 if (e.key == OIS::KC_NUMPADENTER)130 /*if (e.key == OIS::KC_NUMPADENTER) 131 131 { 132 132 this->setActivated(!this->isActivated()); 133 133 this->clear(); 134 134 return true; 135 } 135 }*/ 136 136 137 137 if (this->keyboard_->isModifierDown(OIS::Keyboard::Ctrl)) … … 169 169 } 170 170 171 if (this->bActivated_) 172 { 173 //std::cout << this->keyboard_->getAsString(e.key) << " / " << (char)e.text << std::endl; 174 /* 175 std::string input = this->keyboard_->getAsString(e.key); 176 if (input.size() >= 1) 177 this->append(input[0]); 178 */ 179 this->append((char)e.text); 180 } 171 //std::cout << this->keyboard_->getAsString(e.key) << " / " << (char)e.text << std::endl; 172 173 std::string input = this->keyboard_->getAsString(e.key); 174 /*if (input.size() >= 1) 175 this->append(input[0]);*/ 176 177 this->append((char)e.text); 181 178 return true; 182 179 }
Note: See TracChangeset
for help on using the changeset viewer.