Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 14, 2009, 11:50:47 AM (15 years ago)
Author:
rgrieder
Message:

Added window size as static variable to the WindowEventListener interface.
This resolves several hacks and inconveniences in Mouse, InputManager, InGameConsole, GSGraphics and OrxonoxOverlay.

File:
1 edited

Legend:

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

    r3265 r3291  
    4747#include "core/XMLPort.h"
    4848#include "core/ConsoleCommand.h"
    49 #include "GraphicsManager.h"
    5049
    5150namespace orxonox
     
    8180
    8281        // Get aspect ratio from the render window. Later on, we get informed automatically
    83         Ogre::RenderWindow* defaultWindow = GraphicsManager::getInstance().getRenderWindow();
    84         this->windowAspectRatio_ = (float)defaultWindow->getWidth() / defaultWindow->getHeight();
     82        this->windowAspectRatio_ = (float)this->getWindowWidth() / this->getWindowHeight();
    8583        this->sizeCorrectionChanged();
    8684
Note: See TracChangeset for help on using the changeset viewer.