Changeset 6443 in orxonox.OLD for trunk/src/util/hud.cc
- Timestamp:
- Jan 8, 2006, 5:44:04 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/hud.cc
r6442 r6443 118 118 } 119 119 120 void 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 } 120 143 121 144 void Hud::addWeaponWidget(GLGuiWidget* widget)
Note: See TracChangeset
for help on using the changeset viewer.