Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

hud: radar shown inside of the HUD

File size: 1.6 KB
RevLine 
[4838]1/*!
[6437]2 * @file hud.h
3 * @brief Definition of the ingame HUD.
[3245]4*/
[1853]5
[6437]6#ifndef _HUD_H
7#define _HUD_H
[1853]8
[8448]9#include "element_2d.h"
[8990]10#include "event_listener.h"
[8994]11
12
[4838]13// FORWARD DECLARATION
[6442]14class WeaponManager;
[8518]15namespace OrxGui {
16  class GLGuiWidget;
17  class GLGuiNotifier;
18  class GLGuiInputLine;
[8994]19  class GLGuiRadar;
[8518]20}
21
[8972]22//! A class that renders a HUD (Heads Up Display for User Information).
[8990]23class Hud : public Element2D, public EventListener
[6438]24{
[1853]25
[6438]26public:
[6437]27  Hud();
28  virtual ~Hud();
[1853]29
[6441]30
[6512]31  virtual void loadParams(const TiXmlElement* root);
[6438]32
[8518]33  void notifyUser(const std::string& message);
34
35
[6437]36  void setBackGround();
[8145]37  void setEnergyWidget(OrxGui::GLGuiWidget* widget);
38  void setShiledWidget(OrxGui::GLGuiWidget* widget);
39  void setArmorWidget(OrxGui::GLGuiWidget* widget);
[6442]40  void setWeaponManager(WeaponManager* weaponMan);
[3245]41
[8145]42  void addWeaponWidget(OrxGui::GLGuiWidget* widget);
43  void removeWeaponWidget(OrxGui::GLGuiWidget* widget);
[6437]44
[8995]45  OrxGui::GLGuiRadar* radar() const { return _radar; };
46
[6443]47  void updateWeaponManager();
48
[6441]49  void draw() const;
[8990]50  virtual void process(const Event &event);
[6437]51
[8990]52
[6441]53  private:
54    void updateResolution();
[7062]55
[6438]56private:
[6441]57  unsigned int             resX;
58  unsigned int             resY;
[3245]59
[8145]60  OrxGui::GLGuiWidget*     energyWidget;
61  OrxGui::GLGuiWidget*     shieldWidget;
62  OrxGui::GLGuiWidget*     armorWidget;
[6437]63
[8518]64  OrxGui::GLGuiNotifier*   notifier;
65  OrxGui::GLGuiInputLine*  inputLine;
[8995]66  OrxGui::GLGuiRadar*      _radar;
[8518]67
[6442]68  WeaponManager*           weaponManager;
69
[8145]70  std::list<OrxGui::GLGuiWidget*> weaponsWidgets; //!< WeaponWidgets will be displayed one after another
[1853]71};
72
[6437]73#endif /* _HUD_H */
Note: See TracBrowser for help on using the repository browser.