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.

Location:
code/branches/core4/src/orxonox/overlays
Files:
3 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
  • code/branches/core4/src/orxonox/overlays/console/InGameConsole.cc

    r3279 r3291  
    172172        @brief Initializes the InGameConsole.
    173173    */
    174     void InGameConsole::initialise(int windowWidth, int windowHeight)
     174    void InGameConsole::initialise()
    175175    {
    176176        // create the corresponding input state
     
    248248        this->consoleOverlayContainer_->addChild(this->consoleOverlayNoise_);
    249249
    250         this->windowResized(windowWidth, windowHeight);
     250        this->windowResized(this->getWindowWidth(), this->getWindowWidth());
    251251
    252252        // move overlay "above" the top edge of the screen
  • code/branches/core4/src/orxonox/overlays/console/InGameConsole.h

    r3290 r3291  
    4646        ~InGameConsole();
    4747
    48         void initialise(int windowWidth, int windowHeight);
     48        void initialise();
    4949        void destroy();
    5050        void setConfigValues();
Note: See TracChangeset for help on using the changeset viewer.