Changeset 1374
- Timestamp:
- May 22, 2008, 3:57:27 PM (17 years ago)
- Location:
- code/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/bin/keybindings.ini
r1372 r1374 1 1 [KeyBinder] 2 KeyUNASSIGNED= 2 KeyUNASSIGNED=activateConsole 3 3 KeyESCAPE=exit 4 4 Key1= … … 15 15 KeyEQUALS=activateConsole 16 16 KeyBACK= 17 KeyTAB= cycleFocus17 KeyTAB= 18 18 KeyQ= 19 19 KeyW= … … 154 154 MouseButton6= 155 155 MouseButton7= 156 MouseWheel1Up= AxisAmp 0.1 slomo157 MouseWheel1Down= AxisAmp 0.1 slomo156 MouseWheel1Up= 157 MouseWheel1Down= 158 158 MouseWheel2Up= 159 159 MouseWheel2Down= -
code/trunk/src/orxonox/Orxonox.cc
r1362 r1374 487 487 // orxonoxHUD_->setRocket2(ogreRoot.getCurrentFrameNumber()); 488 488 if (eventTimes[3].back() - eventTimes[3].front() != 0) 489 // orxonoxHUD_->setRocket1((int)(50000.0f/(eventTimes[3].back() - eventTimes[3].front())));489 orxonoxHUD_->setFPS(50000.0f/(eventTimes[3].back() - eventTimes[3].front())); 490 490 491 491 // Iterate through all Tickables and call their tick(dt) function -
code/trunk/src/orxonox/hud/HUD.cc
r1362 r1374 60 60 test->show(); 61 61 test->setMetricsMode(Ogre::GMM_RELATIVE); 62 test->setDimensions(0. 8, 0.8);62 test->setDimensions(0.3, 0.3); 63 63 test->setPosition(0.02, 0.02); 64 64 test->setFontName("Console"); 65 65 test->setCaption("init"); 66 67 // test2 68 fpsText = static_cast<TextAreaOverlayElement*>(om->createOverlayElement("TextArea", "fpsText")); 69 fpsText->show(); 70 fpsText->setMetricsMode(Ogre::GMM_RELATIVE); 71 fpsText->setDimensions(0.3, 0.3); 72 fpsText->setPosition(0.9, 0.02); 73 fpsText->setFontName("Console"); 74 fpsText->setCaption("init"); 66 75 67 76 // create energy bar … … 86 95 container->setMetricsMode(Ogre::GMM_RELATIVE); 87 96 container->addChild(test); 97 container->addChild(fpsText); 88 98 energyBar->init(0.01, 0.94, 0.4, container); 89 99 energyBar->setValue(1); … … 113 123 } 114 124 125 void HUD::setFPS(float fps){ 126 fpsText->setCaption("FPS: " + Ogre::StringConverter::toString(fps)); 127 } 128 115 129 HUD::~HUD(void){ 116 130 } -
code/trunk/src/orxonox/hud/HUD.h
r1362 r1374 50 50 Ogre::OverlayContainer* container; 51 51 Ogre::TextAreaOverlayElement* test; 52 Ogre::TextAreaOverlayElement* fpsText; 52 53 BarOverlayElement* energyBar; 53 54 BarOverlayElement* speedoBar; … … 57 58 HUD(int zoom); 58 59 ~HUD(); 60 void setFPS(float fps); 59 61 virtual void tick(float); 60 62
Note: See TracChangeset
for help on using the changeset viewer.