Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 8453 was 8448, checked in by bensch, 18 years ago

merged gui back to the trunk
merged with command
merge -r8377:HEAD https://svn.orxonox.net/orxonox/branches/gui .

File size: 1.2 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
11class TiXmlElement;
12class WeaponManager;
13namespace OrxGui { class GLGuiWidget; }
14
15//! A class that renders a HUD.
16class Hud : public Element2D
17{
18
19public:
20  Hud();
21  virtual ~Hud();
22
23
24  virtual void loadParams(const TiXmlElement* root);
25
26  void setBackGround();
27  void setEnergyWidget(OrxGui::GLGuiWidget* widget);
28  void setShiledWidget(OrxGui::GLGuiWidget* widget);
29  void setArmorWidget(OrxGui::GLGuiWidget* widget);
30  void setWeaponManager(WeaponManager* weaponMan);
31
32  void addWeaponWidget(OrxGui::GLGuiWidget* widget);
33  void removeWeaponWidget(OrxGui::GLGuiWidget* widget);
34
35  void updateWeaponManager();
36
37  void tick(float dt);
38  void draw() const;
39
40  private:
41    void updateResolution();
42
43private:
44  unsigned int             resX;
45  unsigned int             resY;
46
47  OrxGui::GLGuiWidget*     energyWidget;
48  OrxGui::GLGuiWidget*     shieldWidget;
49  OrxGui::GLGuiWidget*     armorWidget;
50
51  WeaponManager*           weaponManager;
52
53  std::list<OrxGui::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.