Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 6440 was 6438, checked in by bensch, 19 years ago

trunk: widget war

File size: 1.1 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;
14
15
16//! A class that renders a HUD.
17class Hud : private GLGuiWidget
18{
19
20public:
21  Hud();
22  virtual ~Hud();
23
24  void loadParams(const TiXmlElement* root);
25
26  void setBackGround();
27  void setEnergyWidget(GLGuiWidget* widget);
28  void setShiledWidget(GLGuiWidget* widget);
29  void setArmorWidget(GLGuiWidget* widget);
30
31  void addWeaponWidget(GLGuiWidget* widget);
32  void removeWeaponWidget(GLGuiWidget* widget);
33
34  void setResolution(unsigned int resX, unsigned int resY);
35
36private:
37  unsigned int             resX;          //!< The X-Resolution needed for resizing the Hud.
38  unsigned int             resY;          //!< The Y-Resolution needed for resizing the Hud.
39
40  GLGuiWidget*             energyWidget;
41  GLGuiWidget*             shieldWidget;
42  GLGuiWidget*             armorWidget;
43
44  std::list<GLGuiWidget*>  weaponsWidgets; //!< WeaponWidgets will be displayed one after another
45};
46
47#endif /* _HUD_H */
Note: See TracBrowser for help on using the repository browser.