Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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