Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 12, 2008, 12:57:45 AM (16 years ago)
Author:
rgrieder
Message:

svn save, just in case our house burns down over night…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/hud/src/orxonox/GraphicsEngine.cc

    r1564 r1590  
    5050#include "core/CommandExecutor.h"
    5151#include "core/ConsoleCommand.h"
    52 #include "core/input/InputManager.h"
    5352
    5453#include "console/InGameConsole.h"
     
    5655#include "tools/ParticleInterface.h"
    5756#include "Settings.h"
    58 
    59 
    60 namespace orxonox {
     57#include "tools/WindowEventListener.h"
     58
     59
     60namespace orxonox
     61{
    6162  /**
    6263    @brief Returns the singleton instance and creates it the first time.
     
    435436
    436437  /**
    437   * Window has resized.
     438  * Window has moved.
    438439  * @param rw The render window it occured in
    439440  */
    440441  void GraphicsEngine::windowMoved(Ogre::RenderWindow *rw)
    441442  {
    442     // note: this doesn't change the window extents
     443    for (Iterator<orxonox::WindowEventListener> it = ObjectList<orxonox::WindowEventListener>::start(); it; ++it)
     444      it->windowMoved();
    443445  }
    444446
     
    451453  void GraphicsEngine::windowResized(Ogre::RenderWindow *rw)
    452454  {
    453     // change the mouse clipping size for absolute mouse movements
    454     int w = rw->getWidth();
    455     int h = rw->getHeight();
    456     InputManager::setWindowExtents(w, h);
    457     InGameConsole::getInstance().resize();
    458     HUD::getSingleton().resize();
    459   }
    460 
    461   /**
    462   * Window has resized.
     455    for (Iterator<orxonox::WindowEventListener> it = ObjectList<orxonox::WindowEventListener>::start(); it; ++it)
     456      it->windowResized(this->renderWindow_->getWidth(), this->renderWindow_->getHeight());
     457  }
     458
     459  /**
     460  * Window has changed Focus.
    463461  * @param rw The render window it occured in
    464462  */
    465463  void GraphicsEngine::windowFocusChanged(Ogre::RenderWindow *rw)
    466464  {
    467     // note: this doesn't change the window extents
    468   }
    469 
    470   /**
    471   * Window has resized.
     465    for (Iterator<orxonox::WindowEventListener> it = ObjectList<orxonox::WindowEventListener>::start(); it; ++it)
     466      it->windowFocusChanged();
     467  }
     468
     469  /**
     470  * Window was closed.
    472471  * @param rw The render window it occured in
    473472  */
    474473  void GraphicsEngine::windowClosed(Ogre::RenderWindow *rw)
    475474  {
    476     // using CommandExecutor in order to avoid depending on Orxonox class.
     475    // using CommandExecutor in order to avoid depending on Orxonox.h.
    477476    CommandExecutor::execute("exit", false);
    478477  }
Note: See TracChangeset for help on using the changeset viewer.