Changeset 1387 for code/trunk/src/orxonox/hud/HUD.cc
- Timestamp:
- May 22, 2008, 5:22:33 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/hud/HUD.cc
r1375 r1387 43 43 namespace orxonox 44 44 { 45 ConsoleCommandShortcut(HUD, cycleRadarFocus, AccessLevel::User); 46 45 47 using namespace Ogre; 46 48 47 HUD::HUD( int zoom){49 HUD::HUD(){ 48 50 om = &Ogre::OverlayManager::getSingleton(); 49 51 … … 103 105 radar->addObject(Vector3(0.0, 4000.0, 0.0)); 104 106 radar->addObject(Vector3(0.0, 0.0, 6800.0)); 105 RadarOverlayElement::cycleFocus(); 107 } 108 109 HUD::~HUD(){ 110 //todo: clean up objects 106 111 } 107 112 … … 123 128 } 124 129 125 void HUD::setFPS(float fps){ 126 fpsText->setCaption("FPS: " + Ogre::StringConverter::toString(fps)); 130 /*static*/HUD& HUD::getSingleton(){ 131 static HUD theInstance; 132 return theInstance; 127 133 } 128 134 129 HUD::~HUD(void){ 135 /*static*/void HUD::setFPS(float fps){ 136 HUD::getSingleton().fpsText->setCaption("FPS: " + Ogre::StringConverter::toString(fps)); 137 } 138 139 /*static*/void HUD::cycleRadarFocus(){ 140 HUD::getSingleton().radar->cycleFocus(); 130 141 } 131 142 }
Note: See TracChangeset
for help on using the changeset viewer.