Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 5, 2008, 9:50:26 PM (16 years ago)
Author:
rgrieder
Message:
  • getInstance is probably more suitable than getSingleton (as x3n has already done so in most of his classes) I changed it in Orxonox and GraphicsEngine. Maybe more to come.
  • Removed derivation from BaseObject in InputState (templates work well too, don't need a factory at all)
Location:
code/branches/gui/src/orxonox/overlays
Files:
4 edited

Legend:

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

    r1633 r1653  
    115115            // We'll have to get the aspect ratio manually for the first time. Afterwards windowResized() gets
    116116            // called automatically by the GraphicsEngine.
    117             this->windowResized(GraphicsEngine::getSingleton().getWindowWidth(),
    118                 GraphicsEngine::getSingleton().getWindowHeight());
     117            this->windowResized(GraphicsEngine::getInstance().getWindowWidth(),
     118                GraphicsEngine::getInstance().getWindowHeight());
    119119
    120120            this->changedVisibility();
  • code/branches/gui/src/orxonox/overlays/console/InGameConsole.cc

    r1642 r1653  
    147147    {
    148148        // create the corresponding input state
    149         InputManager::getInstance().createSimpleInputState("console", 40)
     149        InputManager::getInstance().createInputState<SimpleInputState>("console", 40)
    150150            ->setKeyHandler(Shell::getInstance().getInputBuffer());
    151151
     
    219219        this->consoleOverlayContainer_->addChild(this->consoleOverlayNoise_);
    220220
    221         this->windowResized(GraphicsEngine::getSingleton().getWindowWidth(), GraphicsEngine::getSingleton().getWindowHeight());
     221        this->windowResized(GraphicsEngine::getInstance().getWindowWidth(), GraphicsEngine::getInstance().getWindowHeight());
    222222
    223223        // move overlay "above" the top edge of the screen
  • code/branches/gui/src/orxonox/overlays/debug/DebugFPSText.cc

    r1625 r1653  
    4949    void DebugFPSText::tick(float dt)
    5050    {
    51         float fps = GraphicsEngine::getSingleton().getAverageFramesPerSecond();
     51        float fps = GraphicsEngine::getInstance().getAverageFramesPerSecond();
    5252        this->text_->setCaption(this->getCaption() + convertToString(fps));
    5353    }
  • code/branches/gui/src/orxonox/overlays/debug/DebugRTRText.cc

    r1625 r1653  
    4949    void DebugRTRText::tick(float dt)
    5050    {
    51         float rtr = GraphicsEngine::getSingleton().getAverageTickTime();
     51        float rtr = GraphicsEngine::getInstance().getAverageTickTime();
    5252        this->text_->setCaption(this->getCaption() + convertToString(rtr));
    5353    }
Note: See TracChangeset for help on using the changeset viewer.