Changeset 8974 in orxonox.OLD for trunk/src/world_entities/elements
- Timestamp:
- Jul 1, 2006, 11:47:08 AM (18 years ago)
- Location:
- trunk/src/world_entities/elements
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/elements/glgui_energywidget.cc
r8973 r8974 28 28 // this->setClassID(CL_PROTO_ID, "GLGuiEnergyWidget"); 29 29 30 this-> text.setParent2D(this);31 this-> bar.setParent2D(this);30 this->pack(&this->text); 31 this->pack(&this->bar); 32 32 } 33 33 … … 40 40 // delete what has to be deleted here 41 41 } 42 43 44 void GLGuiEnergyWidget::setMaximum(float max) 45 { 46 this->bar.setMaximum(max); 47 } 48 49 void GLGuiEnergyWidget::setValue(float value) 50 { 51 MultiType val = value; 52 53 this->bar.setValue(value); 54 this->text.setText(val.getString()); 55 } 56 57 58 42 59 } -
trunk/src/world_entities/elements/glgui_energywidget.h
r8973 r8974 7 7 #define _GLGUI_ENERGY_WIDGET_H 8 8 9 #include "glgui_ widget.h"9 #include "glgui_box.h" 10 10 #include "glgui_bar.h" 11 11 #include "glgui_text.h" … … 15 15 16 16 //! A class for ... 17 class GLGuiEnergyWidget : public GLGui Widget17 class GLGuiEnergyWidget : public GLGuiBox 18 18 { 19 19 … … 22 22 virtual ~GLGuiEnergyWidget(); 23 23 24 void setMaximum(float max); 25 void setValue(float value); 26 24 27 protected: 25 virtual void resize();28 //virtual void resize(); 26 29 27 30 private:
Note: See TracChangeset
for help on using the changeset viewer.