source:
orxonox.OLD/trunk/src/util/hud.h
@
7547
Last change on this file since 7547 was 7062, checked in by bensch, 19 years ago | |
---|---|
File size: 1.1 KB |
Rev | Line | |
---|---|---|
[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] | 13 | class TiXmlElement; |
[6442] | 14 | class WeaponManager; |
[3543] | 15 | |
[6437] | 16 | //! A class that renders a HUD. |
[6441] | 17 | class Hud : public GLGuiWidget |
[6438] | 18 | { |
[1853] | 19 | |
[6438] | 20 | public: |
[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(); | |
[7062] | 43 | |
[6438] | 44 | private: |
[6441] | 45 | unsigned int resX; |
46 | unsigned int resY; | |
[3245] | 47 | |
[6438] | 48 | GLGuiWidget* energyWidget; |
49 | GLGuiWidget* shieldWidget; | |
50 | GLGuiWidget* armorWidget; | |
[6437] | 51 | |
[6442] | 52 | WeaponManager* weaponManager; |
53 | ||
[6438] | 54 | std::list<GLGuiWidget*> weaponsWidgets; //!< WeaponWidgets will be displayed one after another |
[1853] | 55 | }; |
56 | ||
[6437] | 57 | #endif /* _HUD_H */ |
Note: See TracBrowser
for help on using the repository browser.