Changeset 1422 for code/branches/network/src/orxonox/hud/HUD.cc
- Timestamp:
- May 25, 2008, 8:29:05 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/orxonox/hud/HUD.cc
r1414 r1422 75 75 fpsText->setCaption("init"); 76 76 77 // creating text to display render time ratio 78 rTRText = static_cast<TextAreaOverlayElement*>(om->createOverlayElement("TextArea", "rTRText")); 79 rTRText->show(); 80 rTRText->setMetricsMode(Ogre::GMM_PIXELS); 81 rTRText->setDimensions(0.001, 0.001); 82 rTRText->setPosition(10, 30); 83 rTRText->setFontName("Console"); 84 rTRText->setCharHeight(20); 85 rTRText->setCaption("init"); 86 77 87 // create energy bar 78 88 energyBar = static_cast<BarOverlayElement*>(om->createOverlayElement("Bar", "energyBar")); … … 99 109 container->setMetricsMode(Ogre::GMM_RELATIVE); 100 110 container->addChild(fpsText); 111 container->addChild(rTRText); 101 112 102 113 energyBar->init(0.01, 0.94, 0.4, container); … … 133 144 float fps = GraphicsEngine::getSingleton().getAverageFPS(); 134 145 fpsText->setCaption("FPS: " + Ogre::StringConverter::toString(fps)); 146 } 147 148 void HUD::setRenderTimeRatio(float ratio) 149 { 150 rTRText->setCaption("Render time ratio: " + Ogre::StringConverter::toString(ratio)); 135 151 } 136 152
Note: See TracChangeset
for help on using the changeset viewer.