Changeset 2801 for code/branches/gui/src/orxonox/overlays
- Timestamp:
- Mar 19, 2009, 10:58:43 AM (16 years ago)
- Location:
- code/branches/gui/src/orxonox/overlays
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/orxonox/overlays/OrxonoxOverlay.cc
r2662 r2801 39 39 #include <OgreOverlayManager.h> 40 40 #include <OgrePanelOverlayElement.h> 41 #include <OgreRenderWindow.h> 42 41 43 #include "util/Convert.h" 42 44 #include "util/Exception.h" … … 46 48 #include "core/XMLPort.h" 47 49 #include "core/ConsoleCommand.h" 50 #include "GraphicsManager.h" 48 51 49 52 namespace orxonox … … 77 80 this->overlay_->add2D(this->background_); 78 81 79 // We'll have to set the aspect ratio to a default value first.80 // GSGraphics gets informed about our construction here and can update us in the next tick.81 this->windowAspectRatio_ = 1.0;82 // 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 85 this->sizeCorrectionChanged(); 83 86 … … 175 178 /** 176 179 @brief 177 Called by the Graphics Enginewhenever the window size changes.180 Called by the GraphicsManager whenever the window size changes. 178 181 Calculates the aspect ratio only. 179 182 */ 180 void OrxonoxOverlay::windowResized( int newWidth,int newHeight)183 void OrxonoxOverlay::windowResized(unsigned int newWidth, unsigned int newHeight) 181 184 { 182 185 this->windowAspectRatio_ = newWidth/(float)newHeight; -
code/branches/gui/src/orxonox/overlays/OrxonoxOverlay.h
r2662 r2801 200 200 201 201 private: 202 void windowResized( int newWidth,int newHeight);202 void windowResized(unsigned int newWidth, unsigned int newHeight); 203 203 204 204 static unsigned int hudOverlayCounter_s; //!< Static counter for hud elements -
code/branches/gui/src/orxonox/overlays/console/InGameConsole.cc
r2800 r2801 410 410 @brief Resizes the console elements. Call if window size changes. 411 411 */ 412 void InGameConsole::windowResized( int newWidth,int newHeight)412 void InGameConsole::windowResized(unsigned int newWidth, unsigned int newHeight) 413 413 { 414 414 this->windowW_ = newWidth; -
code/branches/gui/src/orxonox/overlays/console/InGameConsole.h
r2800 r2801 81 81 void print(const std::string& text, int index, bool alwaysShift = false); 82 82 83 void windowResized( int newWidth,int newHeight);83 void windowResized(unsigned int newWidth, unsigned int newHeight); 84 84 85 85 // config value related -
code/branches/gui/src/orxonox/overlays/debug/DebugFPSText.cc
r2662 r2801 31 31 #include <OgreTextAreaOverlayElement.h> 32 32 #include "core/CoreIncludes.h" 33 #include "Graphics Engine.h"33 #include "GraphicsManager.h" 34 34 #include "util/Convert.h" 35 35 … … 51 51 SUPER(DebugFPSText, tick, dt); 52 52 53 float fps = Graphics Engine::getInstance().getAverageFramesPerSecond();53 float fps = GraphicsManager::getInstance().getAverageFramesPerSecond(); 54 54 this->setCaption(convertToString(fps)); 55 55 } -
code/branches/gui/src/orxonox/overlays/debug/DebugRTRText.cc
r2662 r2801 32 32 #include "core/CoreIncludes.h" 33 33 #include "util/Convert.h" 34 #include "Graphics Engine.h"34 #include "GraphicsManager.h" 35 35 36 36 namespace orxonox … … 51 51 SUPER(DebugRTRText, tick, dt); 52 52 53 float rtr = Graphics Engine::getInstance().getAverageTickTime();53 float rtr = GraphicsManager::getInstance().getAverageTickTime(); 54 54 this->setCaption(convertToString(rtr)); 55 55 }
Note: See TracChangeset
for help on using the changeset viewer.