Changeset 8977 in orxonox.OLD
- Timestamp:
- Jul 1, 2006, 1:17:57 PM (18 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/elements/glgui_energywidget.cc
r8976 r8977 28 28 // this->setClassID(CL_PROTO_ID, "GLGuiEnergyWidget"); 29 29 30 this->pack(&this->name); 30 31 this->pack(&this->text); 31 32 this->pack(&this->bar); … … 42 43 43 44 45 void GLGuiEnergyWidget::setDisplayedName(const std::string& name) 46 { 47 this->name.setText(name); 48 } 44 49 45 50 void GLGuiEnergyWidget::setMaximum(float max) … … 60 65 void GLGuiEnergyWidget::showing() 61 66 { 67 this->name.show(); 62 68 this->text.show(); 63 69 this->bar.show(); … … 66 72 void GLGuiEnergyWidget::hiding() 67 73 { 74 this->name.hide(); 68 75 this->text.hide(); 69 76 this->bar.hide(); 70 77 } 71 72 73 74 78 } -
trunk/src/world_entities/elements/glgui_energywidget.h
r8975 r8977 22 22 virtual ~GLGuiEnergyWidget(); 23 23 24 void setDisplayedName(const std::string& name); 24 25 void setMaximum(float max); 25 26 void setValue(float value); … … 31 32 32 33 private: 34 GLGuiText name; 33 35 GLGuiBar bar; 34 36 GLGuiText text; -
trunk/src/world_entities/weapons/weapon.cc
r8976 r8977 312 312 if (this->energyWidget == NULL) 313 313 { 314 this->energyWidget = new OrxGui::GLGuiEnergyWidget; 314 this->energyWidget = new OrxGui::GLGuiEnergyWidget(); 315 this->energyWidget->setDisplayedName(this->getClassName()); 315 316 this->energyWidget->setSize2D( 20, 100); 316 317 this->energyWidget->setMaximum(this->getEnergyMax()); -
trunk/src/world_entities/world_entity.cc
r8974 r8977 682 682 { 683 683 this->healthWidget = new OrxGui::GLGuiEnergyWidget(); 684 this->healthWidget->setDisplayedName(std::string(this->getClassName()) + " Energy:"); 684 685 this->healthWidget->setSize2D(30,400); 685 686 this->healthWidget->setAbsCoor2D(10,100);
Note: See TracChangeset
for help on using the changeset viewer.