Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/hud2/src/orxonox/hud/HUD.h @ 1000

Last change on this file since 1000 was 1000, checked in by rgrieder, 16 years ago
  • added a Factory to create OverlayElements by the ourselves
  • added a 3D ogre head to demonstrate the ability to use 3D content in an Overlay (could be used in a radar or whatever needs 3D)
File size: 3.4 KB
Line 
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*      ...
25*
26*/
27
28
29#ifndef _HUD_H__
30#define _HUD_H__
31
32#include <string.h>
33#include <OgreOverlayElement.h>
34#include <OgreTextAreaOverlayElement.h>
35#include <OgrePrerequisites.h>
36
37#include "OrxonoxPrereqs.h"
38
39#include "core/Tickable.h"
40#include "Bar.h"
41
42
43namespace orxonox
44{
45  class _OrxonoxExport HUD : Tickable
46  {
47  private:
48
49  public:
50    HUD(int zoom);
51    ~HUD();
52
53    virtual void tick(float);
54
55    Bar* energyCounter;
56    Ogre::SceneNode* ogreNode_;
57  };
58}       
59
60
61
62
63
64
65
66
67
68#endif _HUD_H_
69
70/*#ifndef _HUD_H__
71#define _HUD_H__
72
73#include <string>
74
75#include <OgrePrerequisites.h>
76
77#include "../OrxonoxPrereqs.h"
78
79
80namespace orxonox
81{
82  class _OrxonoxExport HUD
83  {
84  private:
85    Ogre::OverlayElement* timeText_;
86    Ogre::OverlayElement* targetWindowNameText_;
87    Ogre::OverlayElement* targetWindowStatusText_;
88    Ogre::OverlayElement* targetWindowDistanceText_;
89    Ogre::OverlayElement* targetWindowHitRatingText_;
90    Ogre::OverlayElement* energyLength_;
91    Ogre::OverlayElement* shieldLeftTop_;
92    Ogre::OverlayElement* shieldRightTop_;
93    Ogre::OverlayElement* shieldLeftBottom_;
94    Ogre::OverlayElement* shieldRightBottom_;
95    Ogre::OverlayElement* rocketNum1_;
96    Ogre::OverlayElement* rocketNum2_;
97    Ogre::OverlayElement* rocketNum3_;
98    Ogre::OverlayElement* rocketNum4_;
99    Ogre::OverlayElement* energyDistrPoint_;
100    Ogre::OverlayElement* primarChoice_;
101
102    int timeMin_;
103    int timeSec_;
104
105    std::string targetWindowName_;
106    std::string targetWindowStatus_;
107    int targetWindowDistance_;
108    int targetWindowHitRating_;
109
110    int energyValue_;
111
112    bool shieldLeftTopValue_;
113    bool shieldRightTopValue_;
114    bool shieldLeftBottomValue_;
115    bool shieldRightBottomValue_;
116
117    int rocket1_;
118    int rocket2_;
119    int rocket3_;
120    int rocket4_;
121
122    float energyDistrShield_;
123    float energyDistrEngine_;
124    float energyDistrLaser_;
125
126    float energyDistrPixelX_;
127    float energyDistrPixelY_;
128
129    int primarValue_;
130
131  public:
132    HUD( void );
133    ~HUD( void );
134    void init( void );
135
136    void setTime(int i, int j);
137    void setTargetWindowName(std::string i);
138    void setTargetWindowStatus(std::string i);
139    void setTargetWindowDistance(int i);
140    void setTargetWindowHitRating(int i);
141    void setEnergyValue(int i);
142    void setShieldLeftTopValue(bool i);
143    void setShieldRightTopValue(bool i);
144    void setShieldLeftBottomValue(bool i);
145    void setShieldRightBottomValue(bool i);
146    void setRocket1(int i);
147    void setRocket2(int i);
148    void setRocket3(int i);
149    void setRocket4(int i);
150    void setEnergyDistr(float s, float e, float l);
151    void setPrimar(int i);
152
153  };
154}
155
156#endif /* _HUD_H__ */
Note: See TracBrowser for help on using the repository browser.