- Timestamp:
- Jan 8, 2006, 10:59:21 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 3 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 -
trunk/src/world_entities/weapons/weapon.cc
r6444 r6445 289 289 290 290 291 GLGuiWidget* Weapon::get MaxEnergyWidget()291 GLGuiWidget* Weapon::getLoadedEnergyWidget() 292 292 { 293 293 if (this->energyLoadedWidget == NULL) -
trunk/src/world_entities/weapons/weapon.h
r6439 r6445 150 150 151 151 GLGuiWidget* getEnergyWidget(); 152 GLGuiWidget* get MaxEnergyWidget();152 GLGuiWidget* getLoadedEnergyWidget(); 153 153 154 154 // FLOW
Note: See TracChangeset
for help on using the changeset viewer.