Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

merged the gui back to the trunk

File size: 1.4 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;
[8518]12
[6442]13class WeaponManager;
[8518]14namespace OrxGui {
15  class GLGuiWidget;
16  class GLGuiNotifier;
17  class GLGuiInputLine;
[3543]18
[8518]19}
20
[6437]21//! A class that renders a HUD.
[8145]22class Hud : public Element2D
[6438]23{
[1853]24
[6438]25public:
[6437]26  Hud();
27  virtual ~Hud();
[1853]28
[6441]29
[6512]30  virtual void loadParams(const TiXmlElement* root);
[6438]31
[8518]32  void notifyUser(const std::string& message);
33
34
[6437]35  void setBackGround();
[8145]36  void setEnergyWidget(OrxGui::GLGuiWidget* widget);
37  void setShiledWidget(OrxGui::GLGuiWidget* widget);
38  void setArmorWidget(OrxGui::GLGuiWidget* widget);
[6442]39  void setWeaponManager(WeaponManager* weaponMan);
[3245]40
[8145]41  void addWeaponWidget(OrxGui::GLGuiWidget* widget);
42  void removeWeaponWidget(OrxGui::GLGuiWidget* widget);
[6437]43
[6443]44  void updateWeaponManager();
45
[6441]46  void tick(float dt);
47  void draw() const;
[6437]48
[6441]49  private:
50    void updateResolution();
[7062]51
[6438]52private:
[6441]53  unsigned int             resX;
54  unsigned int             resY;
[3245]55
[8145]56  OrxGui::GLGuiWidget*     energyWidget;
57  OrxGui::GLGuiWidget*     shieldWidget;
58  OrxGui::GLGuiWidget*     armorWidget;
[6437]59
[8518]60  OrxGui::GLGuiNotifier*   notifier;
61  OrxGui::GLGuiInputLine*  inputLine;
62
[6442]63  WeaponManager*           weaponManager;
64
[8145]65  std::list<OrxGui::GLGuiWidget*> weaponsWidgets; //!< WeaponWidgets will be displayed one after another
[1853]66};
67
[6437]68#endif /* _HUD_H */
Note: See TracBrowser for help on using the repository browser.