Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/test/src/util/hud.h @ 10649

Last change on this file since 10649 was 9869, checked in by bensch, 18 years ago

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File size: 1.6 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#include "event_listener.h"
11
12
13// FORWARD DECLARATION
14class WeaponManager;
15namespace OrxGui {
16  class GLGuiWidget;
17  class GLGuiNotifier;
18  class GLGuiInputLine;
19  class GLGuiRadar;
20}
21
22//! A class that renders a HUD (Heads Up Display for User Information).
23class Hud : public Element2D, public EventListener
24{
25  ObjectListDeclaration(Hud);
26
27public:
28  Hud();
29  virtual ~Hud();
30
31
32  virtual void loadParams(const TiXmlElement* root);
33
34  void notifyUser(const std::string& message);
35
36
37  void setBackGround();
38  void setEnergyWidget(OrxGui::GLGuiWidget* widget);
39  void setShiledWidget(OrxGui::GLGuiWidget* widget);
40  void setArmorWidget(OrxGui::GLGuiWidget* widget);
41  void setWeaponManager(WeaponManager* weaponMan);
42
43  void addWeaponWidget(OrxGui::GLGuiWidget* widget);
44  void removeWeaponWidget(OrxGui::GLGuiWidget* widget);
45
46  OrxGui::GLGuiRadar* radar() const { return _radar; };
47
48  void updateWeaponManager();
49
50  void draw() const;
51  virtual void process(const Event &event);
52
53
54  private:
55    void updateResolution();
56
57private:
58  unsigned int             resX;
59  unsigned int             resY;
60
61  OrxGui::GLGuiWidget*     energyWidget;
62  OrxGui::GLGuiWidget*     shieldWidget;
63  OrxGui::GLGuiWidget*     armorWidget;
64
65  OrxGui::GLGuiNotifier*   notifier;
66  OrxGui::GLGuiInputLine*  inputLine;
67  OrxGui::GLGuiRadar*      _radar;
68
69  WeaponManager*           weaponManager;
70
71  std::list<OrxGui::GLGuiWidget*> weaponsWidgets; //!< WeaponWidgets will be displayed one after another
72};
73
74#endif /* _HUD_H */
Note: See TracBrowser for help on using the repository browser.