Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jan 8, 2006, 5:44:04 PM (19 years ago)
Author:
bensch
Message:

huge pipeline

Location:
trunk/src/util
Files:
2 edited

Legend:

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

    r6442 r6443  
    118118}
    119119
     120void Hud::updateWeaponManager()
     121{
     122  // hide all the Widgets
     123  std::list<GLGuiWidget*>::iterator weaponWidget;
     124  for (weaponWidget = this->weaponsWidgets.begin(); weaponWidget != this->weaponsWidgets.end(); weaponWidget++)
     125  {
     126    (*weaponWidget)->hide();
     127  }
     128  this->weaponsWidgets.clear();
     129
     130  // add all that we need again.
     131  if (this->weaponManager != NULL)
     132    for (unsigned int i = 0; i < this->weaponManager->getSlotCount(); i++)
     133  {
     134    Weapon* weapon = this->weaponManager->getWeapon(i);
     135    if (weapon != NULL)
     136    {
     137      weapon->getEnergyWidget()->show();
     138      this->weaponsWidgets.push_back(weapon->getEnergyWidget());
     139    }
     140  }
     141  this->updateResolution();
     142}
    120143
    121144void Hud::addWeaponWidget(GLGuiWidget* widget)
  • trunk/src/util/hud.h

    r6442 r6443  
    3434  void removeWeaponWidget(GLGuiWidget* widget);
    3535
     36  void updateWeaponManager();
     37
    3638  void tick(float dt);
    3739  void draw() const;
Note: See TracChangeset for help on using the changeset viewer.