Changeset 1410 for code/branches/network/src/orxonox/hud/HUD.cc
- Timestamp:
- May 24, 2008, 3:38:39 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/orxonox/hud/HUD.cc
r1406 r1410 26 26 */ 27 27 28 #include <string.h>29 28 #include "OrxonoxStableHeaders.h" 29 #include "HUD.h" 30 31 #include <string> 30 32 #include <OgreOverlay.h> 31 33 #include <OgreOverlayContainer.h> … … 37 39 #include "objects/SpaceShip.h" 38 40 #include "BarOverlayElement.h" 41 #include "RadarObject.h" 39 42 #include "RadarOverlayElement.h" 43 #include "Navigation.h" 40 44 #include "OverlayElementFactories.h" 41 #include "HUD.h"42 45 43 46 namespace orxonox … … 52 55 lastRadarObject = NULL; 53 56 54 57 // create Factories 55 58 BarOverlayElementFactory *barOverlayElementFactory = new BarOverlayElementFactory(); 56 59 om->addOverlayElementFactory(barOverlayElementFactory); … … 84 87 nav = new Navigation(container); 85 88 86 89 // set up screen-wide container 87 90 container->show(); 88 91 … … 144 147 } 145 148 146 /*static*/ HUD& HUD::getSingleton(){149 /*static*/ HUD& HUD::getSingleton(){ 147 150 static HUD theInstance; 148 151 return theInstance; 149 152 } 150 153 151 /*static*/ void HUD::setFPS(float fps){154 /*static*/ void HUD::setFPS(float fps){ 152 155 HUD::getSingleton().fpsText->setCaption("FPS: " + Ogre::StringConverter::toString(fps)); 153 156 } 154 157 155 /*static*/ void HUD::setEnergy(float value){158 /*static*/ void HUD::setEnergy(float value){ 156 159 HUD::getSingleton().energyBar->setValue(value); 157 160 } 158 161 159 /*static*/ void HUD::cycleNavigationFocus(){162 /*static*/ void HUD::cycleNavigationFocus(){ 160 163 HUD::getSingleton().nav->cycleFocus(); 161 164 }
Note: See TracChangeset
for help on using the changeset viewer.