Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6440 in orxonox.OLD for trunk/src/util


Ignore:
Timestamp:
Jan 8, 2006, 3:20:00 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: now the Widgets are only rendered within the HUD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/hud.cc

    r6438 r6440  
    2929  this->setClassID(CL_HUD, "Hud");
    3030
     31
     32  this->energyWidget = NULL;
     33  this->shieldWidget = NULL;
     34  this->armorWidget = NULL;
    3135}
    3236
     
    5357void Hud::setEnergyWidget(GLGuiWidget* widget)
    5458{
     59  // decopple old widget
     60  if (this->energyWidget != NULL)
     61  {
     62    this->energyWidget->hide();
     63  }
     64
     65  this->energyWidget = widget;
     66  if (this->energyWidget != NULL)
     67  {
     68    this->energyWidget->show();
     69    this->energyWidget->setAbsCoor2D(10,80);
     70    this->energyWidget->setSize2D(20,300);
     71  }
     72
    5573
    5674}
Note: See TracChangeset for help on using the changeset viewer.