[1505] | 1 | /* |
---|
| 2 | * ORXONOX - the hottest 3D action shooter ever to exist |
---|
| 3 | * > www.orxonox.net < |
---|
[1502] | 4 | * |
---|
[1505] | 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 | * |
---|
[1502] | 22 | * Author: |
---|
| 23 | * Yuning Chai |
---|
| 24 | * Co-authors: |
---|
| 25 | * Felix Schulthess |
---|
| 26 | * |
---|
| 27 | */ |
---|
[1362] | 28 | |
---|
| 29 | |
---|
| 30 | #ifndef _HUD_H__ |
---|
| 31 | #define _HUD_H__ |
---|
| 32 | |
---|
[1502] | 33 | #include "OrxonoxPrereqs.h" |
---|
| 34 | |
---|
| 35 | #include <OgrePrerequisites.h> |
---|
[1407] | 36 | #include <OgreTextAreaOverlayElement.h> |
---|
[1502] | 37 | #include <OgreSceneNode.h> |
---|
[1362] | 38 | #include "core/Tickable.h" |
---|
[1502] | 39 | #include "util/Math.h" |
---|
[1362] | 40 | |
---|
| 41 | namespace orxonox |
---|
| 42 | { |
---|
| 43 | class _OrxonoxExport HUD : public Tickable |
---|
| 44 | { |
---|
[1502] | 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; |
---|
[1362] | 59 | |
---|
[1502] | 60 | bool showFPS; |
---|
| 61 | bool showRenderTime; |
---|
[1362] | 62 | |
---|
[1502] | 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(); |
---|
[1362] | 78 | }; |
---|
| 79 | } |
---|
| 80 | |
---|
[1502] | 81 | #endif /* _HUD_H__ */ |
---|