Changeset 1604 for code/branches/hud/src/orxonox/overlays/OverlayGroup.h
- Timestamp:
- Jun 15, 2008, 1:09:07 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hud/src/orxonox/overlays/OverlayGroup.h
r1601 r1604 21 21 * 22 22 * Author: 23 * Yuning Chai23 * Reto Grieder 24 24 * Co-authors: 25 * Felix Schulthess25 * ... 26 26 * 27 27 */ 28 29 28 30 29 #ifndef _OverlayGroup_H__ … … 33 32 #include "OrxonoxPrereqs.h" 34 33 34 #include <map> 35 35 #include <OgrePrerequisites.h> 36 #include <OgreTextAreaOverlayElement.h>37 36 #include "core/BaseObject.h" 38 #include "objects/Tickable.h"39 37 #include "util/Math.h" 40 #include "hud/OverlayElementFactories.h"41 #include "tools/WindowEventListener.h"42 38 43 39 namespace orxonox … … 46 42 class OrxonoxOverlay; 47 43 48 class _OrxonoxExport OverlayGroup : public BaseObject , public TickableReal, public WindowEventListener44 class _OrxonoxExport OverlayGroup : public BaseObject 49 45 { 50 46 public: … … 54 50 virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); 55 51 56 virtual void tick(float); 52 void scale(const Vector2& scale); 53 Vector2 getScale() const { return this->scale_; } 57 54 58 void resize(); 59 void addRadarObject(WorldEntity* object, const ColourValue& colour = ColourValue(0.5, 0.5, 0.5, 1)); 60 void removeRadarObject(WorldEntity* object); 61 void setFPS(); 62 63 inline std::list<RadarObject*>& getRadarObjects() 64 { return this->roSet_; } 65 55 static void toggleVisibility(const std::string& name); 66 56 static OverlayGroup& getHUD(); 67 68 static void setEnergy(float value);69 static void cycleNavigationFocus();70 static void releaseNavigationFocus();71 static void toggleVisibility(const std::string& name);72 57 73 58 private: … … 77 62 OrxonoxOverlay* getElement(unsigned int index); 78 63 79 void windowResized(int newWidth, int newHeight);80 81 64 std::map<std::string, OrxonoxOverlay*> hudElements_; 82 83 std::list<RadarObject*> roSet_; 84 85 RadarOverlayElementFactory radarOverlayElementFactory_; 86 87 Ogre::Overlay* orxonoxHUD_; 88 Ogre::OverlayContainer* container_; 89 Ogre::TextAreaOverlayElement* fpsText_; 90 Ogre::TextAreaOverlayElement* rTRText_; 91 HUDBar* energyBar_; 92 BarOverlayElement* speedoBar_; 93 RadarOverlayElement* radar_; 94 HUDNavigation* nav_; 95 96 bool showFPS_; 97 bool showRenderTime_; 65 Vector2 scale_; 98 66 99 67 static OverlayGroup* hudInstance_s;
Note: See TracChangeset
for help on using the changeset viewer.