- Timestamp:
- Jan 8, 2006, 1:12:38 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 2 deleted
- 2 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/defs/class_id.h
r6426 r6437 195 195 CL_EVENT = 0x00000501, 196 196 CL_KEY_MAPPER = 0x00000502, 197 CL_USER_CONTROL = 0x00000511,198 197 CL_CROSSHAIR = 0x00000512, 199 198 200 199 CL_WEAPON_MANAGER = 0x00000503, 200 CL_HUD = 0x00000520, 201 201 202 202 // Physics stuff (range from 0x00000600 to 0x000007ff) -
trunk/src/util/Makefile.am
r6142 r6437 8 8 loading/factory.cc \ 9 9 state.cc \ 10 user_control.cc \10 hud.cc \ 11 11 animation/animation3d.cc \ 12 12 animation/animation.cc \ … … 23 23 object_manager.h \ 24 24 state.h \ 25 user_control.h \25 hud.h \ 26 26 animation/animation3d.h \ 27 27 animation/animation.h \ -
trunk/src/util/hud.cc
r6436 r6437 10 10 11 11 ### File Specific: 12 main-programmer: ...12 main-programmer: Benjamin Grauer 13 13 co-programmer: ... 14 14 */ … … 16 16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ 17 17 18 #include " proto_class.h"18 #include "hud.h" 19 19 20 20 using namespace std; … … 25 25 * @todo this constructor is not jet implemented - do it 26 26 */ 27 ProtoClass::ProtoClass()27 Hud::Hud () 28 28 { 29 this->setClassID(CL_ PROTO_ID, "ProtoClass");29 this->setClassID(CL_HUD, "Hud"); 30 30 31 /* If you make a new class, what is most probably the case when you write this file32 don't forget to:33 1. Add the new file new_class.cc to the ./src/Makefile.am34 2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS35 36 Advanced Topics:37 - if you want to let your object be managed via the ObjectManager make sure to read38 the object_manager.h header comments. You will use this most certanly only if you39 make many objects of your class, like a weapon bullet.40 */41 31 } 42 32 … … 45 35 * standard deconstructor 46 36 */ 47 ProtoClass::~ProtoClass()37 Hud::~Hud () 48 38 { 49 39 // delete what has to be deleted here -
trunk/src/util/hud.h
r6436 r6437 1 1 /*! 2 * @file proto_class.h3 * @brief Definition of ...2 * @file hud.h 3 * @brief Definition of the ingame HUD. 4 4 */ 5 5 6 #ifndef _ PROTO_CLASS_H7 #define _ PROTO_CLASS_H6 #ifndef _HUD_H 7 #define _HUD_H 8 8 9 #include "base_object.h" 9 #include "element_2d.h" 10 #include <list> 10 11 11 12 // FORWARD DECLARATION 13 #include "glgui_widget.h" 12 14 13 15 14 16 15 //! A class for ...16 class ProtoClass : public BaseObject {17 //! A class that renders a HUD. 18 class Hud : private GLGuiWidget { 17 19 18 20 public: 19 ProtoClass(); 20 virtual ~ProtoClass(); 21 Hud(); 22 virtual ~Hud(); 23 24 void setBackGround(); 25 void setEnergyWidget(GLGuiWidget* widget); 26 void setShiledWidget(GLGuiWidget* widget); 27 void setArmorWidget(GLGuiWidget* widget); 28 29 void addWeaponWidget(GLGuiWidget* widget); 30 void removeWeaponWidget(GLGuiWidget* widget); 21 31 22 32 23 33 private: 34 unsigned int resX; //!< The X-Resolution needed for resizing the Hud. 35 unsigned int resY; //!< The Y-Resolution needed for resizing the Hud. 24 36 37 GLGuiWidget* energyWidget; 38 GLGuiWidget* shieldWidget; 39 GLGuiWidget* armorWidget; 40 41 std::list<GLGuiWidget*> weaponsWidgets; //!< WeaponWidgets will be displayed one after another 25 42 }; 26 43 27 #endif /* _ PROTO_CLASS_H */44 #endif /* _HUD_H */
Note: See TracChangeset
for help on using the changeset viewer.