Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 1, 2006, 11:47:08 AM (18 years ago)
Author:
bensch
Message:

trunk: better implemented

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/elements/glgui_energywidget.cc

    r8973 r8974  
    2828    //   this->setClassID(CL_PROTO_ID, "GLGuiEnergyWidget");
    2929
    30     this->text.setParent2D(this);
    31     this->bar.setParent2D(this);
     30    this->pack(&this->text);
     31    this->pack(&this->bar);
    3232  }
    3333
     
    4040    // delete what has to be deleted here
    4141  }
     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
    4259}
Note: See TracChangeset for help on using the changeset viewer.