Changeset 1590 for code/branches/hud/src/orxonox/console
- Timestamp:
- Jun 12, 2008, 12:57:45 AM (17 years ago)
- Location:
- code/branches/hud/src/orxonox/console
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hud/src/orxonox/console/InGameConsole.cc
r1578 r1590 170 170 this->consoleOverlayContainer_->addChild(this->consoleOverlayNoise_); 171 171 172 this-> resize();172 this->windowResized(GraphicsEngine::getSingleton().getWindowWidth(), GraphicsEngine::getSingleton().getWindowHeight()); 173 173 174 174 // move overlay "above" the top edge of the screen … … 370 370 @brief Resizes the console elements. Call if window size changes. 371 371 */ 372 void InGameConsole:: resize()373 { 374 this->windowW_ = GraphicsEngine::getSingleton().getWindowWidth();375 this->windowH_ = GraphicsEngine::getSingleton().getWindowHeight();372 void InGameConsole::windowResized(int newWidth, int newHeight) 373 { 374 this->windowW_ = newWidth; 375 this->windowH_ = newHeight; 376 376 this->consoleOverlayBorder_->setWidth((int) this->windowW_* this->relativeWidth); 377 377 this->consoleOverlayBorder_->setHeight((int) this->windowH_ * this->relativeHeight); … … 468 468 Shell::getInstance().registerListener(this); 469 469 470 this-> resize();470 this->windowResized(this->windowW_, this->windowH_); 471 471 this->linesChanged(); 472 472 this->cursorChanged(); -
code/branches/hud/src/orxonox/console/InGameConsole.h
r1578 r1590 38 38 #include "core/Shell.h" 39 39 #include "objects/Tickable.h" 40 #include "tools/WindowEventListener.h" 40 41 41 42 42 43 namespace orxonox 43 44 { 44 class _OrxonoxExport InGameConsole : public TickableReal, public ShellListener 45 class _OrxonoxExport InGameConsole : public TickableReal, public ShellListener, public WindowEventListener 45 46 { 46 47 public: // functions … … 50 51 51 52 void tick(float dt); 52 void resize();53 53 54 54 static InGameConsole& getInstance(); … … 76 76 void setCursorPosition(unsigned int pos); 77 77 void print(const std::string& text, int index, bool alwaysShift = false); 78 79 void windowResized(int newWidth, int newHeight); 78 80 79 81 static Ogre::UTFString convert2UTF(std::string s);
Note: See TracChangeset
for help on using the changeset viewer.