Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/bsp_model/src/util/hud.h @ 8374

Last change on this file since 8374 was 8145, checked in by bensch, 19 years ago

trunk: merged the gui back
merged with command:
svn merge -r8114:HEAD https://svn.orxonox.net/orxonox/branches/gui .
→ no conflicts

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 "glgui_widget.h"
10#include <list>
11
12// FORWARD DECLARATION
13class TiXmlElement;
14class WeaponManager;
15
16//! A class that renders a HUD.
17class Hud : public Element2D
18{
19
20public:
21  Hud();
22  virtual ~Hud();
23
24
25  virtual void loadParams(const TiXmlElement* root);
26
27  void setBackGround();
28  void setEnergyWidget(OrxGui::GLGuiWidget* widget);
29  void setShiledWidget(OrxGui::GLGuiWidget* widget);
30  void setArmorWidget(OrxGui::GLGuiWidget* widget);
31  void setWeaponManager(WeaponManager* weaponMan);
32
33  void addWeaponWidget(OrxGui::GLGuiWidget* widget);
34  void removeWeaponWidget(OrxGui::GLGuiWidget* widget);
35
36  void updateWeaponManager();
37
38  void tick(float dt);
39  void draw() const;
40
41  private:
42    void updateResolution();
43
44private:
45  unsigned int             resX;
46  unsigned int             resY;
47
48  OrxGui::GLGuiWidget*     energyWidget;
49  OrxGui::GLGuiWidget*     shieldWidget;
50  OrxGui::GLGuiWidget*     armorWidget;
51
52  WeaponManager*           weaponManager;
53
54  std::list<OrxGui::GLGuiWidget*> weaponsWidgets; //!< WeaponWidgets will be displayed one after another
55};
56
57#endif /* _HUD_H */
Note: See TracBrowser for help on using the repository browser.