Changeset 1878 for code/trunk/src/orxonox
- Timestamp:
- Oct 3, 2008, 1:26:48 PM (16 years ago)
- Location:
- code/trunk/src/orxonox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/gamestates/GSGraphics.cc
r1828 r1878 140 140 using namespace Ogre; 141 141 142 // remove our WindowEventListener first to avoid bad calls in the procedures 143 Ogre::WindowEventUtilities::removeWindowEventListener(this->renderWindow_, this); 144 142 145 delete this->guiManager_; 143 146 … … 149 152 150 153 // destroy render window 151 this->renderWindow_->removeAllViewports();152 this->renderWindow_->removeAllListeners();153 154 RenderSystem* renderer = this->ogreRoot_->getRenderSystem(); 154 155 renderer->destroyRenderWindow("Orxonox"); … … 360 361 The render window it occured in 361 362 */ 362 void GSGraphics::windowFocusChange d(Ogre::RenderWindow *rw)363 void GSGraphics::windowFocusChange(Ogre::RenderWindow *rw) 363 364 { 364 365 for (ObjectList<orxonox::WindowEventListener>::iterator it = ObjectList<orxonox::WindowEventListener>::begin(); it; ++it) 365 366 it->windowFocusChanged(); 367 368 // instruct InputManager to clear the buffers (core library so we cannot use the interface) 369 InputManager::getInstance().clearBuffers(); 366 370 } 367 371 -
code/trunk/src/orxonox/gamestates/GSGraphics.h
r1788 r1878 65 65 void windowMoved (Ogre::RenderWindow* rw); 66 66 void windowResized (Ogre::RenderWindow* rw); 67 void windowFocusChange d(Ogre::RenderWindow* rw);67 void windowFocusChange (Ogre::RenderWindow* rw); 68 68 void windowClosed (Ogre::RenderWindow* rw); 69 69 -
code/trunk/src/orxonox/gui/GUIManager.cc
r1810 r1878 156 156 SimpleInputState* state = InputManager::getInstance().createInputState<SimpleInputState>("gui", 30); 157 157 state->setHandler(this); 158 state->setJoyStickHandler( new EmptyHandler());158 state->setJoyStickHandler(&InputManager::EMPTY_HANDLER); 159 159 160 160 // load the background scene -
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.