Changeset 1012 for code/branches
- Timestamp:
- Apr 10, 2008, 1:41:35 PM (17 years ago)
- Location:
- code/branches/hud2/src/orxonox/hud
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hud2/src/orxonox/hud/Bar.cc
r1002 r1012 28 28 #include <OgreOverlayManager.h> 29 29 #include <OgreOverlayElement.h> 30 #include <OgreOverlayContainer.h> 31 #include <OgrePanelOverlayElement.h> 30 32 #include <OgreStringConverter.h> 31 33 #include <OgreColourValue.h> 32 34 #include <string.h> 33 35 34 #include "Bar V1.h"36 #include "Bar.h" 35 37 36 38 namespace orxonox … … 38 40 using namespace Ogre; 39 41 40 Bar::Bar(const String& name):Ogre::OverlayElement(name){} 42 // typeName_s = "Bar"; 43 44 Bar::Bar(const String& name):Ogre::PanelOverlayElement(name){ 45 } 41 46 42 47 48 Bar::~Bar(){} 49 50 // const Ogre::String& Bar::getTypeName() const { return typeName_s;} 51 52 53 54 void Bar::initialise(){ 55 PanelOverlayElement::initialise(); 56 setDimensions(100,100); 57 setPosition(10,10); 58 setMaterialName("Orxonox/Green"); 59 setMetricsMode(Ogre::GMM_PIXELS); 60 } 43 61 44 62 -
code/branches/hud2/src/orxonox/hud/Bar.h
r1002 r1012 32 32 #include <string> 33 33 #include <OgreColourValue.h> 34 #include <OgrePanelOverlayElement.h> 35 #include <OgreOverlayManager.h> 34 36 #include <OgreOverlayElement.h> 37 #include <OgreOverlayContainer.h> 35 38 #include <OgrePrerequisites.h> 36 39 #include <string.h> … … 41 44 namespace orxonox 42 45 { 43 class Bar : public Ogre::OverlayElement46 class _OrxonoxExport Bar : public Ogre::PanelOverlayElement 44 47 { 45 48 private: … … 48 51 Ogre::ColourValue color_; 49 52 53 static Ogre::String& typeName_s; 50 54 51 55 public: 52 56 53 57 Bar(const Ogre::String& name); 58 59 virtual void initialise(); 60 61 virtual ~Bar(); 62 63 // virtual const Ogre::String& getTypeName() const; 54 64 // virtual ~Bar(); 55 65 -
code/branches/hud2/src/orxonox/hud/Factories.h
r1002 r1012 54 54 55 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 56 #endif -
code/branches/hud2/src/orxonox/hud/HUD.cc
r1002 r1012 32 32 #include <OgreOverlayManager.h> 33 33 #include <OgreSceneNode.h> 34 #include <OgreEntity.h> 34 35 35 36 #include "HUD.h" … … 68 69 Ogre::OverlayElement* BarElement = overlayManager.createOverlayElementFromFactory("Bar", "BarElement"); 69 70 70 71 72 71 energyCounterPanel->addChild(BarElement); 73 72 74 73 Ogre::Overlay* orxonoxOverlay = overlayManager.create("Orxonox/HUD"); … … 93 92 { 94 93 this->ogreNode_->roll(Ogre::Degree(dt*200),Ogre::Node::TS_LOCAL); 95 this->ogreNode_->yaw(Ogre::Degree(dt*200),Ogre::Node::TS_LOCAL); 96 this->ogreNode_->pitch(Ogre::Degree(dt*200),Ogre::Node::TS_LOCAL); 94 this->ogreNode_->yaw(Ogre::Degree(dt*200),Ogre::Node::TS_LOCAL); 95 this->ogreNode_->pitch(Ogre::Degree(dt*200),Ogre::Node::TS_LOCAL); 97 96 } 98 97 } -
code/branches/hud2/src/orxonox/hud/HUD.h
r1000 r1012 66 66 67 67 68 #endif _HUD_H_68 #endif 69 69 70 70 /*#ifndef _HUD_H__
Note: See TracChangeset
for help on using the changeset viewer.