Changeset 6445 in orxonox.OLD for trunk/src/util
- Timestamp:
- Jan 8, 2006, 10:59:21 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/hud.cc
r6443 r6445 103 103 this->weaponManager = weaponMan; 104 104 105 if (weaponManager != NULL) 106 for (unsigned int i = 0; i < weaponMan->getSlotCount(); i++) 107 { 108 Weapon* weapon = weaponMan->getWeapon(i); 109 if (weapon != NULL) 110 { 111 weapon->getEnergyWidget()->show(); 112 this->weaponsWidgets.push_back(weapon->getEnergyWidget()); 113 114 } 115 } 116 117 this->updateResolution(); 105 this->updateWeaponManager(); 106 this->updateResolution(); 118 107 } 119 108 … … 136 125 { 137 126 weapon->getEnergyWidget()->show(); 127 weapon->getLoadedEnergyWidget()->show(); 138 128 this->weaponsWidgets.push_back(weapon->getEnergyWidget()); 129 this->weaponsWidgets.push_back(weapon->getLoadedEnergyWidget()); 139 130 } 140 131 } … … 164 155 std::list<GLGuiWidget*>::iterator weaponWidget; 165 156 float pos = .2; 166 for (weaponWidget = this->weaponsWidgets.begin(); weaponWidget != this->weaponsWidgets.end(); weaponWidget++, pos+=.03) 157 bool test = true; 158 for (weaponWidget = this->weaponsWidgets.begin(); weaponWidget != this->weaponsWidgets.end(); weaponWidget++, pos+=.03, test = !test) 167 159 { 168 (*weaponWidget)->setSize2D(.02*this->resX, .2 *this->resY); 169 (*weaponWidget)->setAbsCoor2D(pos*this->resX, .75*this->resY); 160 if (test) 161 { 162 (*weaponWidget)->setSize2D(.02*this->resX, .2 *this->resY); 163 (*weaponWidget)->setAbsCoor2D(pos*this->resX, .75*this->resY); 164 } 165 else 166 { 167 (*weaponWidget)->setSize2D(.02*this->resX, .17*this->resY); 168 (*weaponWidget)->setAbsCoor2D((pos-.008)*this->resX, .75*this->resY); 169 } 170 170 171 } 171 172
Note: See TracChangeset
for help on using the changeset viewer.