Changeset 1588 for code/branches/hud/src/orxonox/hud/HUD.h
- Timestamp:
- Jun 11, 2008, 12:21:42 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hud/src/orxonox/hud/HUD.h
r1567 r1588 35 35 #include <OgrePrerequisites.h> 36 36 #include <OgreTextAreaOverlayElement.h> 37 #include "core/BaseObject.h" 37 38 #include "objects/Tickable.h" 38 39 #include "util/Math.h" … … 41 42 namespace orxonox 42 43 { 43 class _OrxonoxExport HUD : public TickableReal 44 class HUDBar; 45 class HUDOverlay; 46 47 class _OrxonoxExport HUD : public BaseObject, public TickableReal 44 48 { 45 49 public: 46 void initialise(); 47 void destroy(); 50 HUD(); 51 ~HUD(); 52 53 virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); 48 54 49 55 virtual void tick(float); … … 52 58 void addRadarObject(WorldEntity* object, const ColourValue& colour = ColourValue(0.5, 0.5, 0.5, 1)); 53 59 void removeRadarObject(WorldEntity* object); 54 void setRenderTimeRatio(float ratio);55 60 void setFPS(); 56 61 … … 63 68 static void cycleNavigationFocus(); 64 69 static void releaseNavigationFocus(); 65 static void toggleFPS(); 66 static void toggleRenderTime(); 70 static void toggleVisibility(const std::string& name); 67 71 68 72 private: 69 HUD();70 73 HUD(const HUD& instance); 71 ~HUD(); 74 75 void addHUDElement(HUDOverlay* element); 76 HUDOverlay* getHUDElement(unsigned int index); 77 78 std::map<std::string, HUDOverlay*> hudElements_; 72 79 73 80 std::list<RadarObject*> roSet_; 74 BarOverlayElementFactory barOverlayElementFactory_; 81 75 82 RadarOverlayElementFactory radarOverlayElementFactory_; 76 83 … … 79 86 Ogre::TextAreaOverlayElement* fpsText_; 80 87 Ogre::TextAreaOverlayElement* rTRText_; 81 BarOverlayElement* energyBar_;88 HUDBar* energyBar_; 82 89 BarOverlayElement* speedoBar_; 83 90 RadarOverlayElement* radar_; … … 86 93 bool showFPS_; 87 94 bool showRenderTime_; 95 96 static HUD* instance_s; 88 97 }; 89 98 }
Note: See TracChangeset
for help on using the changeset viewer.