Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/util/hud.h @ 9110

Last change on this file since 9110 was 8995, checked in by bensch, 18 years ago

hud: radar shown inside of the HUD

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
26public:
27  Hud();
28  virtual ~Hud();
29
30
31  virtual void loadParams(const TiXmlElement* root);
32
33  void notifyUser(const std::string& message);
34
35
36  void setBackGround();
37  void setEnergyWidget(OrxGui::GLGuiWidget* widget);
38  void setShiledWidget(OrxGui::GLGuiWidget* widget);
39  void setArmorWidget(OrxGui::GLGuiWidget* widget);
40  void setWeaponManager(WeaponManager* weaponMan);
41
42  void addWeaponWidget(OrxGui::GLGuiWidget* widget);
43  void removeWeaponWidget(OrxGui::GLGuiWidget* widget);
44
45  OrxGui::GLGuiRadar* radar() const { return _radar; };
46
47  void updateWeaponManager();
48
49  void draw() const;
50  virtual void process(const Event &event);
51
52
53  private:
54    void updateResolution();
55
56private:
57  unsigned int             resX;
58  unsigned int             resY;
59
60  OrxGui::GLGuiWidget*     energyWidget;
61  OrxGui::GLGuiWidget*     shieldWidget;
62  OrxGui::GLGuiWidget*     armorWidget;
63
64  OrxGui::GLGuiNotifier*   notifier;
65  OrxGui::GLGuiInputLine*  inputLine;
66  OrxGui::GLGuiRadar*      _radar;
67
68  WeaponManager*           weaponManager;
69
70  std::list<OrxGui::GLGuiWidget*> weaponsWidgets; //!< WeaponWidgets will be displayed one after another
71};
72
73#endif /* _HUD_H */
Note: See TracBrowser for help on using the repository browser.