- Timestamp:
- Jul 1, 2006, 11:26:00 AM (18 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gl/glgui_bar.cc
r8448 r8972 55 55 } 56 56 57 void GLGuiBar::resize() 58 { 59 GLGuiWidget::resize(); 60 61 62 } 63 64 57 65 /** 58 66 * @brief draws the GLGuiBar … … 60 68 void GLGuiBar::draw() const 61 69 { 70 printf("BAR\n"); 62 71 this->beginDraw(); 63 64 72 GLGuiWidget::draw(); 65 73 66 //this->frontMaterial().select();67 glBegin(GL_QUADS);68 69 glTexCoord2f(0,0);70 glVertex2f(3.0, 3.0);71 glTexCoord2f(0, value/maximum);72 glVertex2f(3.0, (this->getSizeY2D()-3.0)* (value/maximum));73 glTexCoord2f(1, value/maximum);74 glVertex2f(this->getSizeX2D()-3.0, (this->getSizeY2D()-3.0) * (value/maximum));75 glTexCoord2f(1,0);76 glVertex2f(this->getSizeX2D()-3.0, 3.0);77 78 glEnd();79 74 this->endDraw(); 80 75 } -
trunk/src/lib/gui/gl/glgui_bar.h
r8145 r8972 37 37 virtual void draw() const; 38 38 39 protected: 40 virtual void resize(); 41 39 42 private: 40 43 void init(); -
trunk/src/lib/gui/gl/glgui_text.h
r8145 r8972 9 9 10 10 #include "glgui_widget.h" 11 11 #include "text.h" 12 12 // FORWARD DECLARATION 13 class Text;14 13 namespace OrxGui 15 14 { … … 19 18 * 20 19 */ 21 class GLGuiText : public GL Widget20 class GLGuiText : public GLGuiWidget 22 21 { 23 22 … … 35 34 36 35 private: 37 Text *text;36 Text text; 38 37 }; 39 38 } -
trunk/src/util/hud.h
r8518 r8972 19 19 } 20 20 21 //! A class that renders a HUD .21 //! A class that renders a HUD (Heads Up Display for User Information). 22 22 class Hud : public Element2D 23 23 { -
trunk/src/world_entities/Makefile.am
r8255 r8972 29 29 \ 30 30 effects/explosion.cc \ 31 effects/billboard.cc 31 effects/billboard.cc \ 32 \ 33 \ 34 elements/glgui_energywidget.cc 32 35 33 36 … … 59 62 effects/billboard.h \ 60 63 \ 64 \ 65 \ 66 elements/glgui_energywidget.h \ 61 67 $(WorldEntities_HEADERS_) 62 68 -
trunk/src/world_entities/elements/glgui_energywidget.cc
r8970 r8972 16 16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ 17 17 18 #include " proto_class.h"18 #include "glgui_energywidget.h" 19 19 20 using namespace std; 20 namespace OrxGui 21 { 22 /** 23 * @brief standard constructor 24 * @todo this constructor is not jet implemented - do it 25 */ 26 GLGuiEnergyWidget::GLGuiEnergyWidget () 27 { 28 // this->setClassID(CL_PROTO_ID, "GLGuiEnergyWidget"); 29 } 21 30 22 31 23 /** 24 * standard constructor 25 * @todo this constructor is not jet implemented - do it 26 */ 27 ProtoClass::ProtoClass () 28 { 29 this->setClassID(CL_PROTO_ID, "ProtoClass"); 30 31 /* If you make a new class, what is most probably the case when you write this file 32 don't forget to: 33 1. Add the new file new_class.cc to the ./src/Makefile.am 34 2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS 35 36 Advanced Topics: 37 - if you want to let your object be managed via the ObjectManager make sure to read 38 the object_manager.h header comments. You will use this most certanly only if you 39 make many objects of your class, like a weapon bullet. 32 /** 33 * @brief standard deconstructor 40 34 */ 35 GLGuiEnergyWidget::~GLGuiEnergyWidget () 36 { 37 // delete what has to be deleted here 38 } 41 39 } 42 43 44 /**45 * standard deconstructor46 */47 ProtoClass::~ProtoClass ()48 {49 // delete what has to be deleted here50 } -
trunk/src/world_entities/elements/glgui_energywidget.h
r8970 r8972 1 1 /*! 2 * @file proto_class.h3 * @brief Definition of ...2 * @file glgui_energywidget.h 3 * @brief Definition of an EnergyWidget, that displays a bar and a Text 4 4 */ 5 5 6 #ifndef _ PROTO_CLASS_H7 #define _ PROTO_CLASS_H6 #ifndef _GLGUI_ENERGY_WIDGET_H 7 #define _GLGUI_ENERGY_WIDGET_H 8 8 9 #include "base_object.h" 9 #include "glgui_widget.h" 10 #include "glgui_bar.h" 11 #include "glgui_text.h" 10 12 11 // FORWARD DECLARATION 13 namespace OrxGui 14 { 15 16 //! A class for ... 17 class GLGuiEnergyWidget : public GLGuiWidget 18 { 19 20 public: 21 GLGuiEnergyWidget(); 22 virtual ~GLGuiEnergyWidget(); 12 23 13 24 25 private: 26 GLGuiBar bar; 27 GLGuiText text; 14 28 15 //! A class for ... 16 class ProtoClass : public BaseObject { 17 18 public: 19 ProtoClass(); 20 virtual ~ProtoClass(); 21 22 23 private: 24 25 }; 26 27 #endif /* _PROTO_CLASS_H */ 29 }; 30 } 31 #endif /* _GLGUI_ENERGY_WIDGET_H */ -
trunk/src/world_entities/world_entity.cc
r8894 r8972 41 41 #include "kill.h" 42 42 43 #include <stdarg.h>44 45 46 using namespace std;47 43 48 44 SHELL_COMMAND(model, WorldEntity, loadModel)
Note: See TracChangeset
for help on using the changeset viewer.