Last change
on this file since 8517 was
8517,
checked in by bensch, 18 years ago
|
notifier now in hud (have to reposition it usefully
|
File size:
1.4 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 "element_2d.h" |
---|
10 | // FORWARD DECLARATION |
---|
11 | class TiXmlElement; |
---|
12 | |
---|
13 | class WeaponManager; |
---|
14 | namespace OrxGui { |
---|
15 | class GLGuiWidget; |
---|
16 | class GLGuiNotifier; |
---|
17 | class GLGuiInputLine; |
---|
18 | |
---|
19 | } |
---|
20 | |
---|
21 | //! A class that renders a HUD. |
---|
22 | class Hud : public Element2D |
---|
23 | { |
---|
24 | |
---|
25 | public: |
---|
26 | Hud(); |
---|
27 | virtual ~Hud(); |
---|
28 | |
---|
29 | |
---|
30 | virtual void loadParams(const TiXmlElement* root); |
---|
31 | |
---|
32 | void notifyUser(const std::string& message); |
---|
33 | |
---|
34 | |
---|
35 | void setBackGround(); |
---|
36 | void setEnergyWidget(OrxGui::GLGuiWidget* widget); |
---|
37 | void setShiledWidget(OrxGui::GLGuiWidget* widget); |
---|
38 | void setArmorWidget(OrxGui::GLGuiWidget* widget); |
---|
39 | void setWeaponManager(WeaponManager* weaponMan); |
---|
40 | |
---|
41 | void addWeaponWidget(OrxGui::GLGuiWidget* widget); |
---|
42 | void removeWeaponWidget(OrxGui::GLGuiWidget* widget); |
---|
43 | |
---|
44 | void updateWeaponManager(); |
---|
45 | |
---|
46 | void tick(float dt); |
---|
47 | void draw() const; |
---|
48 | |
---|
49 | private: |
---|
50 | void updateResolution(); |
---|
51 | |
---|
52 | private: |
---|
53 | unsigned int resX; |
---|
54 | unsigned int resY; |
---|
55 | |
---|
56 | OrxGui::GLGuiWidget* energyWidget; |
---|
57 | OrxGui::GLGuiWidget* shieldWidget; |
---|
58 | OrxGui::GLGuiWidget* armorWidget; |
---|
59 | |
---|
60 | OrxGui::GLGuiNotifier* notifier; |
---|
61 | OrxGui::GLGuiInputLine* inputLine; |
---|
62 | |
---|
63 | WeaponManager* weaponManager; |
---|
64 | |
---|
65 | std::list<OrxGui::GLGuiWidget*> weaponsWidgets; //!< WeaponWidgets will be displayed one after another |
---|
66 | }; |
---|
67 | |
---|
68 | #endif /* _HUD_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.