Changeset 1502 for code/trunk/src/orxonox/hud/HUD.h
- Timestamp:
- Jun 1, 2008, 3:54:20 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/hud/HUD.h
r1407 r1502 1 1 /* 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * 4 * 5 * License notice: 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 * Author: 22 * Yuning Chai 23 * Co-authors: 24 * Felix Schulthess 25 * 26 */ 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * > www.orxonox.net < 4 * 5 * 6 * License notice: 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License 10 * as published by the Free Software Foundation; either version 2 11 * of the License, or (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 * 22 * Author: 23 * Yuning Chai 24 * Co-authors: 25 * Felix Schulthess 26 * 27 */ 27 28 28 29 … … 30 31 #define _HUD_H__ 31 32 32 #include <string.h> 33 #include <OgreOverlayElement.h> 33 #include "OrxonoxPrereqs.h" 34 35 #include <OgrePrerequisites.h> 34 36 #include <OgreTextAreaOverlayElement.h> 35 #include <OgrePrerequisites.h> 36 37 #include "OrxonoxPrereqs.h" 37 #include <OgreSceneNode.h> 38 38 #include "core/Tickable.h" 39 #include "BarOverlayElement.h" 40 #include "RadarOverlayElement.h" 41 39 #include "util/Math.h" 42 40 43 41 namespace orxonox … … 45 43 class _OrxonoxExport HUD : public Tickable 46 44 { 47 private: 48 Ogre::OverlayManager* om; 49 Ogre::Overlay* orxonoxHUD; 50 Ogre::OverlayContainer* container; 51 Ogre::TextAreaOverlayElement* test; 52 BarOverlayElement* energyBar; 53 BarOverlayElement* speedoBar; 54 RadarOverlayElement* radar; 45 private: 46 HUD(); 47 HUD(HUD& instance); 48 ~HUD(); 49 Ogre::OverlayManager* om; 50 Ogre::SceneManager* sm; 51 Ogre::Overlay* orxonoxHUD; 52 Ogre::OverlayContainer* container; 53 Ogre::TextAreaOverlayElement* fpsText; 54 Ogre::TextAreaOverlayElement* rTRText; 55 BarOverlayElement* energyBar; 56 BarOverlayElement* speedoBar; 57 RadarOverlayElement* radar; 58 Navigation* nav; 55 59 56 public: 57 HUD(int zoom); 58 ~HUD(); 59 virtual void tick(float); 60 bool showFPS; 61 bool showRenderTime; 60 62 63 public: 64 virtual void tick(float); 65 void addRadarObject(Ogre::SceneNode* node, int colour = 0); 66 void removeRadarObject(Ogre::SceneNode* node); 67 void setRenderTimeRatio(float ratio); 68 void setFPS(); 69 70 std::set<RadarObject*> roSet; 71 72 static HUD* instance_s; 73 static HUD& getSingleton(); 74 static void setEnergy(float value); 75 static void cycleNavigationFocus(); 76 static void toggleFPS(); 77 static void toggleRenderTime(); 61 78 }; 62 79 } 63 80 64 #endif 81 #endif /* _HUD_H__ */
Note: See TracChangeset
for help on using the changeset viewer.