Last change
on this file since 6603 was
6512,
checked in by bensch, 19 years ago
|
orxonox/trunk: loadParams is now virtual.
ALL THE CLASSES HAVE TO CALL
SuperClass::loadParams(root);
isntead of:
static_cast<SuperClass*>(this)→loadParams(root);
which was quite stupid anyways
|
File size:
1.1 KB
|
Line | |
---|
1 | /*! |
---|
2 | * @file hud.h |
---|
3 | * @brief Definition of the ingame HUD. |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _HUD_H |
---|
7 | #define _HUD_H |
---|
8 | |
---|
9 | #include "glgui_widget.h" |
---|
10 | #include <list> |
---|
11 | |
---|
12 | // FORWARD DECLARATION |
---|
13 | class TiXmlElement; |
---|
14 | class WeaponManager; |
---|
15 | |
---|
16 | //! A class that renders a HUD. |
---|
17 | class Hud : public GLGuiWidget |
---|
18 | { |
---|
19 | |
---|
20 | public: |
---|
21 | Hud(); |
---|
22 | virtual ~Hud(); |
---|
23 | |
---|
24 | |
---|
25 | virtual void loadParams(const TiXmlElement* root); |
---|
26 | |
---|
27 | void setBackGround(); |
---|
28 | void setEnergyWidget(GLGuiWidget* widget); |
---|
29 | void setShiledWidget(GLGuiWidget* widget); |
---|
30 | void setArmorWidget(GLGuiWidget* widget); |
---|
31 | void setWeaponManager(WeaponManager* weaponMan); |
---|
32 | |
---|
33 | void addWeaponWidget(GLGuiWidget* widget); |
---|
34 | void removeWeaponWidget(GLGuiWidget* widget); |
---|
35 | |
---|
36 | void updateWeaponManager(); |
---|
37 | |
---|
38 | void tick(float dt); |
---|
39 | void draw() const; |
---|
40 | |
---|
41 | private: |
---|
42 | void updateResolution(); |
---|
43 | private: |
---|
44 | unsigned int resX; |
---|
45 | unsigned int resY; |
---|
46 | |
---|
47 | GLGuiWidget* energyWidget; |
---|
48 | GLGuiWidget* shieldWidget; |
---|
49 | GLGuiWidget* armorWidget; |
---|
50 | |
---|
51 | WeaponManager* weaponManager; |
---|
52 | |
---|
53 | std::list<GLGuiWidget*> weaponsWidgets; //!< WeaponWidgets will be displayed one after another |
---|
54 | }; |
---|
55 | |
---|
56 | #endif /* _HUD_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.