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