Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: the Hud now scales the Widgets itself

File size: 990 bytes
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 : public GLGuiWidget
18{
19
20public:
21  Hud();
22  virtual ~Hud();
23
24
25  void loadParams(const TiXmlElement* root);
26
27  void setBackGround();
28  void setEnergyWidget(GLGuiWidget* widget);
29  void setShiledWidget(GLGuiWidget* widget);
30  void setArmorWidget(GLGuiWidget* widget);
31
32  void addWeaponWidget(GLGuiWidget* widget);
33  void removeWeaponWidget(GLGuiWidget* widget);
34
35  void tick(float dt);
36  void draw() const;
37
38  private:
39    void updateResolution();
40private:
41  unsigned int             resX;
42  unsigned int             resY;
43
44  GLGuiWidget*             energyWidget;
45  GLGuiWidget*             shieldWidget;
46  GLGuiWidget*             armorWidget;
47
48  std::list<GLGuiWidget*>  weaponsWidgets; //!< WeaponWidgets will be displayed one after another
49};
50
51#endif /* _HUD_H */
Note: See TracBrowser for help on using the repository browser.