Changeset 1878 for code/trunk/src/orxonox/overlays/console/InGameConsole.cc
- Timestamp:
- Oct 3, 2008, 1:26:48 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/overlays/console/InGameConsole.cc
r1819 r1878 70 70 , consoleOverlayBorder_(0) 71 71 , consoleOverlayTextAreas_(0) 72 , inputState_(0) 72 73 { 73 74 RegisterObject(InGameConsole); … … 143 144 SetConfigValue(noiseSize_, 1.0f); 144 145 SetConfigValue(cursorSymbol_, '|'); 146 SetConfigValue(bHidesAllInput_, false).callback(this, &InGameConsole::bHidesAllInputChanged); 147 } 148 149 /** 150 @brief Called whenever bHidesAllInput_ changes. 151 */ 152 void InGameConsole::bHidesAllInputChanged() 153 { 154 if (inputState_) 155 { 156 if (bHidesAllInput_) 157 { 158 inputState_->setMouseHandler(&InputManager::EMPTY_HANDLER); 159 inputState_->setJoyStickHandler(&InputManager::EMPTY_HANDLER); 160 } 161 else 162 { 163 inputState_->setMouseHandler(0); 164 inputState_->setJoyStickHandler(0); 165 } 166 } 145 167 } 146 168 … … 151 173 { 152 174 // create the corresponding input state 153 InputManager::getInstance().createInputState<SimpleInputState>("console", 40) 154 ->setKeyHandler(Shell::getInstance().getInputBuffer()); 175 inputState_ = InputManager::getInstance().createInputState<SimpleInputState>("console", 40); 176 inputState_->setKeyHandler(Shell::getInstance().getInputBuffer()); 177 bHidesAllInputChanged(); 155 178 156 179 // create overlay and elements
Note: See TracChangeset
for help on using the changeset viewer.