Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 20, 2008, 7:49:26 PM (16 years ago)
Author:
rgrieder
Message:

merged input branch into gui test branch (was about time)
svn save (it's still a mess and CMLs haven't been updated)
I'll have to create a special project to create the tolua_bind files for tolua itself anyway..

Location:
code/branches/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gui

  • code/branches/gui/src/orxonox/overlays/console/InGameConsole.cc

    r1633 r1638  
    5959        @brief Constructor: Creates and initializes the InGameConsole.
    6060    */
    61     InGameConsole::InGameConsole() :
    62         consoleOverlay_(0), consoleOverlayContainer_(0),
    63         consoleOverlayNoise_(0), consoleOverlayCursor_(0), consoleOverlayBorder_(0),
    64         consoleOverlayTextAreas_(0)
     61    InGameConsole::InGameConsole()
     62        : consoleOverlay_(0)
     63        , consoleOverlayContainer_(0)
     64        , consoleOverlayNoise_(0)
     65        , consoleOverlayCursor_(0)
     66        , consoleOverlayBorder_(0)
     67        , consoleOverlayTextAreas_(0)
     68        , emptySceneManager_(0)
     69        , emptyCamera_(0)
     70        , viewport_(0)
    6571    {
    6672        RegisterObject(InGameConsole);
     
    188194
    189195        Shell::getInstance().addOutputLevel(true);
     196
     197        // create a sceneManager in order to render in our own viewport
     198        this->emptySceneManager_ = Ogre::Root::getSingleton()
     199            .createSceneManager(Ogre::ST_GENERIC, "Console/EmptySceneManager");
     200        this->emptyCamera_ = this->emptySceneManager_->createCamera("Console/EmptyCamera");
     201        this->viewport_ = GraphicsEngine::getSingleton().getRenderWindow()->addViewport(emptyCamera_, 10);
     202        this->viewport_->setOverlaysEnabled(true);
     203        this->viewport_->setClearEveryFrame(false);
    190204
    191205        COUT(4) << "Info: InGameConsole initialized" << std::endl;
     
    476490        {
    477491            this->bActive_ = true;
    478             InputManager::setInputState(InputManager::IS_CONSOLE);
     492            InputManager::requestEnterState("console");
    479493            Shell::getInstance().registerListener(this);
    480494
     
    498512        {
    499513            this->bActive_ = false;
    500             InputManager::setInputState(InputManager::IS_NORMAL);
     514            InputManager::requestLeaveState("console");
    501515            Shell::getInstance().unregisterListener(this);
    502516
Note: See TracChangeset for help on using the changeset viewer.