Changeset 1356 for code/branches/hud3/src/orxonox/hud/HUD.cc
- Timestamp:
- May 22, 2008, 1:05:53 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hud3/src/orxonox/hud/HUD.cc
r1352 r1356 33 33 #include <OgreSceneNode.h> 34 34 #include <OgreEntity.h> 35 #include <OgreStringConverter.h> 35 36 #include "core/Debug.h" 36 37 #include "objects/SpaceShip.h" … … 55 56 orxonoxHUD = om->create("Orxonox/HUD"); 56 57 container = static_cast<Ogre::OverlayContainer*>(om->createOverlayElement("Panel", "Orxonox/HUD/container")); 58 // test 59 test = static_cast<TextAreaOverlayElement*>(om->createOverlayElement("TextArea", "test123")); 60 test->show(); 61 test->setMetricsMode(Ogre::GMM_RELATIVE); 62 test->setDimensions(0.8, 0.8); 63 test->setPosition(0.02, 0.02); 64 test->setFontName("Console"); 65 test->setCaption("init"); 66 57 67 // create energy bar 58 68 energyBar = static_cast<BarOverlayElement*>(om->createOverlayElement("Bar", "energyBar")); … … 75 85 container->setHeight(1.0); 76 86 container->setMetricsMode(Ogre::GMM_RELATIVE); 87 container->addChild(test); 77 88 energyBar->init(0.01, 0.94, 0.4, container); 78 89 energyBar->setValue(1); 79 90 speedoBar->init(0.01, 0.90, 0.4, container); 80 91 radar->init(0.5, 0.9, 0.2, container); 81 radar->addObject(Vector3(1500.0, 0.0, 0.0));92 radar->addObject(Vector3(1500.0, 0.0, 100.0)); 82 93 radar->addObject(Vector3(0.0, 4000.0, 0.0)); 83 94 radar->addObject(Vector3(0.0, 0.0, 6800.0)); 84 95 RadarOverlayElement::cycleFocus(); 85 96 } … … 87 98 void HUD::tick(float dt) 88 99 { 100 int d = radar->getDist2Focus()/10; 101 test->setCaption("Distance: " + Ogre::StringConverter::toString(d)); 102 89 103 energyBar->resize(); 90 104
Note: See TracChangeset
for help on using the changeset viewer.