Changeset 6443 in orxonox.OLD for trunk/src/util
- Timestamp:
- Jan 8, 2006, 5:44:04 PM (19 years ago)
- Location:
- trunk/src/util
- Files:
-
- 2 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) -
trunk/src/util/hud.h
r6442 r6443 34 34 void removeWeaponWidget(GLGuiWidget* widget); 35 35 36 void updateWeaponManager(); 37 36 38 void tick(float dt); 37 39 void draw() const;
Note: See TracChangeset
for help on using the changeset viewer.