/*! * @file hud.h * @brief Definition of the ingame HUD. */ #ifndef _HUD_H #define _HUD_H #include "glgui_widget.h" #include // FORWARD DECLARATION class TiXmlElement; class WeaponManager; //! A class that renders a HUD. class Hud : public GLGuiWidget { public: Hud(); virtual ~Hud(); void loadParams(const TiXmlElement* root); void setBackGround(); void setEnergyWidget(GLGuiWidget* widget); void setShiledWidget(GLGuiWidget* widget); void setArmorWidget(GLGuiWidget* widget); void setWeaponManager(WeaponManager* weaponMan); void addWeaponWidget(GLGuiWidget* widget); void removeWeaponWidget(GLGuiWidget* widget); void updateWeaponManager(); void tick(float dt); void draw() const; private: void updateResolution(); private: unsigned int resX; unsigned int resY; GLGuiWidget* energyWidget; GLGuiWidget* shieldWidget; GLGuiWidget* armorWidget; WeaponManager* weaponManager; std::list weaponsWidgets; //!< WeaponWidgets will be displayed one after another }; #endif /* _HUD_H */