Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 6943 was 6512, checked in by bensch, 19 years ago

orxonox/trunk: loadParams is now virtual.
ALL THE CLASSES HAVE TO CALL

SuperClass::loadParams(root);

isntead of:
static_cast<SuperClass*>(this)→loadParams(root);

which was quite stupid anyways

File size: 1.1 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
[6438]9#include "glgui_widget.h"
[6437]10#include <list>
[1853]11
[4838]12// FORWARD DECLARATION
[6438]13class TiXmlElement;
[6442]14class WeaponManager;
[3543]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
[6512]25  virtual void loadParams(const TiXmlElement* root);
[6438]26
[6437]27  void setBackGround();
28  void setEnergyWidget(GLGuiWidget* widget);
29  void setShiledWidget(GLGuiWidget* widget);
30  void setArmorWidget(GLGuiWidget* widget);
[6442]31  void setWeaponManager(WeaponManager* weaponMan);
[3245]32
[6437]33  void addWeaponWidget(GLGuiWidget* widget);
34  void removeWeaponWidget(GLGuiWidget* widget);
35
[6443]36  void updateWeaponManager();
37
[6441]38  void tick(float dt);
39  void draw() const;
[6437]40
[6441]41  private:
42    void updateResolution();
[6438]43private:
[6441]44  unsigned int             resX;
45  unsigned int             resY;
[3245]46
[6438]47  GLGuiWidget*             energyWidget;
48  GLGuiWidget*             shieldWidget;
49  GLGuiWidget*             armorWidget;
[6437]50
[6442]51  WeaponManager*           weaponManager;
52
[6438]53  std::list<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.