Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/network/src/orxonox/hud/HUD.h @ 1494

Last change on this file since 1494 was 1494, checked in by rgrieder, 16 years ago
  • set the svn:eol-style property to all files so, that where ever you check out, you'll get the right line endings (had to change every file with mixed endings to windows in order to set the property)
  • Property svn:eol-style set to native
File size: 2.2 KB
Line 
1/* *   ORXONOX - the hottest 3D action shooter ever to exist *                    > www.orxonox.net < * * *   License notice: * *   This program is free software; you can redistribute it and/or *   modify it under the terms of the GNU General Public License *   as published by the Free Software Foundation; either version 2 *   of the License, or (at your option) any later version. * *   This program is distributed in the hope that it will be useful, *   but WITHOUT ANY WARRANTY; without even the implied warranty of *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *   GNU General Public License for more details. * *   You should have received a copy of the GNU General Public License *   along with this program; if not, write to the Free Software *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA. *
2 *   Author:
3 *      Yuning Chai
4 *   Co-authors:
5 *      Felix Schulthess
6 *
7 */
8
9
10#ifndef _HUD_H__
11#define _HUD_H__
12
13#include "OrxonoxPrereqs.h"
14
15#include <OgrePrerequisites.h>
16#include <OgreTextAreaOverlayElement.h>
17#include <OgreSceneNode.h>
18#include "core/Tickable.h"
19#include "util/Math.h"
20
21namespace orxonox
22{
23    class _OrxonoxExport HUD : public Tickable
24    {
25      private:
26        HUD();
27        HUD(HUD& instance);
28        ~HUD();
29        Ogre::OverlayManager* om;
30        Ogre::SceneManager* sm;
31        Ogre::Overlay* orxonoxHUD;
32        Ogre::OverlayContainer* container;
33        Ogre::TextAreaOverlayElement* fpsText;
34        Ogre::TextAreaOverlayElement* rTRText;
35        BarOverlayElement* energyBar;
36        BarOverlayElement* speedoBar;
37        RadarOverlayElement* radar;
38        Navigation* nav;
39
40        bool showFPS;
41        bool showRenderTime;
42
43      public:
44        virtual void tick(float);
45        void addRadarObject(Ogre::SceneNode* node, int colour = 0);
46        void removeRadarObject(Ogre::SceneNode* node);
47        void setRenderTimeRatio(float ratio);
48        void setFPS();
49
50        std::set<RadarObject*> roSet;
51
52        static HUD* instance_s;
53        static HUD& getSingleton();
54        static void setEnergy(float value);
55        static void cycleNavigationFocus();
56        static void toggleFPS();
57        static void toggleRenderTime();
58    };
59}
60
61#endif /* _HUD_H__ */
Note: See TracBrowser for help on using the repository browser.