Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2834


Ignore:
Timestamp:
Mar 23, 2009, 4:48:23 PM (16 years ago)
Author:
bknecht
Message:

When you change the camera, the GUI is now newly set. Also: the GUI remembers if it was hidden or not. Only problem at the moment: Input is captured for the wrong thing. Ingame the GUI captures the input.

Location:
code/branches/gui/src/orxonox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gui/src/orxonox/CameraManager.cc

    r2710 r2834  
    4141#include "tools/Shader.h"
    4242#include "util/String.h"
     43#include "gui/GUIManager.h"
    4344
    4445namespace orxonox
     
    141142
    142143        this->viewport_->setCamera(camera);
     144        GUIManager::getInstancePtr()->setCamera(camera);
    143145
    144146        // reactivate all visible compositors
  • code/branches/gui/src/orxonox/gamestates/GSStandalone.cc

    r2817 r2834  
    5858        // not sure if necessary
    5959        // guiManager_->loadScene("IngameMenu");
    60 
    61         Ogre::Viewport* viewport = GraphicsManager::getInstance().getViewport();
    62         guiManager_->showGUI("IngameMenu", viewport->getCamera()->getSceneManager());
    6360    }
    6461
     
    7269    void GSStandalone::ticked(const Clock& time)
    7370    {
    74         Ogre::Viewport* viewport = GraphicsManager::getInstance().getViewport();
     71        //Ogre::Viewport* viewport = GraphicsManager::getInstance().getViewport();
    7572        //COUT(0) << "** " << viewport->getCamera()->getSceneManager() << std::endl;
    7673        //guiManager_->testFct();
    7774        //Ogre::Viewport* viewport = GraphicsManager::getInstance().getViewport();
    78         guiManager_->showGUI("IngameMenu", viewport->getCamera()->getSceneManager());
     75        //guiManager_->showGUI("IngameMenu", viewport->getCamera()->getSceneManager());
    7976
    8077        // tick CEGUI
  • code/branches/gui/src/orxonox/gui/GUIManager.cc

    r2814 r2834  
    267267    }
    268268
     269    void GUIManager::setCamera(Ogre::Camera* camera)
     270    {
     271        this->showGUI("default", camera->getSceneManager());
     272    }
     273
    269274    void GUIManager::showGUI(const std::string& name, Ogre::SceneManager* sceneManager)// bool showBackground)
    270275    {
  • code/branches/gui/src/orxonox/gui/GUIManager.h

    r2808 r2834  
    8383        static void toggleGUI();
    8484
     85        void setCamera(Ogre::Camera* camera);
    8586        Ogre::Camera* getCamera() { return this->backgroundCamera_; }
    8687
Note: See TracChangeset for help on using the changeset viewer.