source:
orxonox.OLD/branches/playability/src/util/hud.h
@
10073
Last change on this file since 10073 was 9965, checked in by marcscha, 18 years ago | |
---|---|
File size: 1.7 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 | |
[8448] | 9 | #include "element_2d.h" |
[8990] | 10 | #include "event_listener.h" |
[8994] | 11 | |
12 | ||
[4838] | 13 | // FORWARD DECLARATION |
[6442] | 14 | class WeaponManager; |
[8518] | 15 | namespace OrxGui { |
16 | class GLGuiWidget; | |
17 | class GLGuiNotifier; | |
18 | class GLGuiInputLine; | |
[8994] | 19 | class GLGuiRadar; |
[8518] | 20 | } |
21 | ||
[8972] | 22 | //! A class that renders a HUD (Heads Up Display for User Information). |
[8990] | 23 | class Hud : public Element2D, public EventListener |
[6438] | 24 | { |
[9869] | 25 | ObjectListDeclaration(Hud); |
[1853] | 26 | |
[6438] | 27 | public: |
[6437] | 28 | Hud(); |
29 | virtual ~Hud(); | |
[1853] | 30 | |
[6441] | 31 | |
[6512] | 32 | virtual void loadParams(const TiXmlElement* root); |
[6438] | 33 | |
[8518] | 34 | void notifyUser(const std::string& message); |
35 | ||
36 | ||
[6437] | 37 | void setBackGround(); |
[8145] | 38 | void setEnergyWidget(OrxGui::GLGuiWidget* widget); |
39 | void setShiledWidget(OrxGui::GLGuiWidget* widget); | |
40 | void setArmorWidget(OrxGui::GLGuiWidget* widget); | |
[9965] | 41 | void setWeaponManager(WeaponManager* weaponMan, WeaponManager* weaponManSec = NULL); |
[3245] | 42 | |
[8145] | 43 | void addWeaponWidget(OrxGui::GLGuiWidget* widget); |
44 | void removeWeaponWidget(OrxGui::GLGuiWidget* widget); | |
[6437] | 45 | |
[8995] | 46 | OrxGui::GLGuiRadar* radar() const { return _radar; }; |
47 | ||
[6443] | 48 | void updateWeaponManager(); |
49 | ||
[6441] | 50 | void draw() const; |
[8990] | 51 | virtual void process(const Event &event); |
[6437] | 52 | |
[8990] | 53 | |
[6441] | 54 | private: |
55 | void updateResolution(); | |
[7062] | 56 | |
[6438] | 57 | private: |
[6441] | 58 | unsigned int resX; |
59 | unsigned int resY; | |
[3245] | 60 | |
[8145] | 61 | OrxGui::GLGuiWidget* energyWidget; |
62 | OrxGui::GLGuiWidget* shieldWidget; | |
63 | OrxGui::GLGuiWidget* armorWidget; | |
[6437] | 64 | |
[8518] | 65 | OrxGui::GLGuiNotifier* notifier; |
66 | OrxGui::GLGuiInputLine* inputLine; | |
[8995] | 67 | OrxGui::GLGuiRadar* _radar; |
[8518] | 68 | |
[6442] | 69 | WeaponManager* weaponManager; |
[9965] | 70 | WeaponManager* weaponManagerSecondary; |
[6442] | 71 | |
[8145] | 72 | std::list<OrxGui::GLGuiWidget*> weaponsWidgets; //!< WeaponWidgets will be displayed one after another |
[1853] | 73 | }; |
74 | ||
[6437] | 75 | #endif /* _HUD_H */ |
Note: See TracBrowser
for help on using the repository browser.