Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 3, 2008, 1:26:48 PM (16 years ago)
Author:
rgrieder
Message:

Fixed two issues with input:

  • Buffer gets cleared now when the window focus changes
  • Added a configValue in the InGameConsole:

Until now the input was always transparent to the level when activating the console (exception keyboard input of course)
bHidesAllInput_ can change that setting (configured in orxonox.ini)

@Oli: Sorry, couldn't apply the patch in the network branch because of conflicts (I have already made some changes to the InputManager in the trunk)

Location:
code/trunk/src/orxonox/gamestates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/gamestates/GSGraphics.cc

    r1828 r1878  
    140140        using namespace Ogre;
    141141
     142        // remove our WindowEventListener first to avoid bad calls in the procedures
     143        Ogre::WindowEventUtilities::removeWindowEventListener(this->renderWindow_, this);
     144
    142145        delete this->guiManager_;
    143146
     
    149152
    150153        // destroy render window
    151         this->renderWindow_->removeAllViewports();
    152         this->renderWindow_->removeAllListeners();
    153154        RenderSystem* renderer = this->ogreRoot_->getRenderSystem();
    154155        renderer->destroyRenderWindow("Orxonox");
     
    360361        The render window it occured in
    361362    */
    362     void GSGraphics::windowFocusChanged(Ogre::RenderWindow *rw)
     363    void GSGraphics::windowFocusChange(Ogre::RenderWindow *rw)
    363364    {
    364365        for (ObjectList<orxonox::WindowEventListener>::iterator it = ObjectList<orxonox::WindowEventListener>::begin(); it; ++it)
    365366            it->windowFocusChanged();
     367
     368        // instruct InputManager to clear the buffers (core library so we cannot use the interface)
     369        InputManager::getInstance().clearBuffers();
    366370    }
    367371
  • code/trunk/src/orxonox/gamestates/GSGraphics.h

    r1788 r1878  
    6565        void windowMoved       (Ogre::RenderWindow* rw);
    6666        void windowResized     (Ogre::RenderWindow* rw);
    67         void windowFocusChanged(Ogre::RenderWindow* rw);
     67        void windowFocusChange (Ogre::RenderWindow* rw);
    6868        void windowClosed      (Ogre::RenderWindow* rw);
    6969
Note: See TracChangeset for help on using the changeset viewer.