Changeset 1878 for code/trunk/src/orxonox/overlays/console
- Timestamp:
- Oct 3, 2008, 1:26:48 PM (16 years ago)
- Location:
- code/trunk/src/orxonox/overlays/console
- Files:
-
- 2 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 -
code/trunk/src/orxonox/overlays/console/InGameConsole.h
r1755 r1878 81 81 void windowResized(int newWidth, int newHeight); 82 82 83 // config value related 84 void bHidesAllInputChanged(); 85 83 86 static Ogre::UTFString convert2UTF(std::string s); 84 87 … … 102 105 Ogre::TextAreaOverlayElement** consoleOverlayTextAreas_; 103 106 107 // input related 108 SimpleInputState* inputState_; 109 104 110 // config values 105 111 float relativeWidth; … … 109 115 float noiseSize_; 110 116 char cursorSymbol_; 117 bool bHidesAllInput_; 111 118 112 119 static InGameConsole* singletonRef_s;
Note: See TracChangeset
for help on using the changeset viewer.