- Timestamp:
- Jul 1, 2006, 1:05:38 PM (18 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/hud.cc
r8975 r8976 19 19 20 20 #include "state.h" 21 #include "debug.h" 21 22 22 23 #include "world_entities/weapons/weapon_manager.h" … … 121 122 122 123 this->updateWeaponManager(); 123 this->updateResolution();124 // this->updateResolution(); 124 125 } 125 126 … … 141 142 if (weapon != NULL) 142 143 { 144 //PRINTF(0)("WEAPON %s::%s in Slots\n", weapon->getClassName(), weapon->getName()); 143 145 weapon->getEnergyWidget()->show(); 144 146 weapon->getEnergyWidget()->setBackgroundColor(Color(.8,.2,.11, 0.1)); … … 161 163 this->resX = State::getResX(); 162 164 this->resY = State::getResY(); 165 166 this->setSize2D(.2 * this->resX, this->resY); 167 163 168 if (this->energyWidget != NULL) 164 169 { … … 167 172 } 168 173 169 this->setSize2D(.2 * this->resX, this->resY);170 174 171 175 std::list<OrxGui::GLGuiWidget*>::iterator weaponWidget; 172 176 float pos = .3; 173 for (weaponWidget = this->weaponsWidgets.begin(); weaponWidget != this->weaponsWidgets.end(); weaponWidget++, pos+=.03) 174 { 175 (*weaponWidget)->setWidgetSize(.02*this->resX, .2 *this->resY); 176 (*weaponWidget)->setAbsCoor2D(pos*this->resX, .75*this->resY); 177 177 for (weaponWidget = this->weaponsWidgets.begin(); weaponWidget != this->weaponsWidgets.end(); weaponWidget++, pos+=.3) 178 { 179 (*weaponWidget)->setAbsCoor2D(pos*this->resX, .9*this->resY); 180 (*weaponWidget)->setWidgetSize(.02*this->resX, .1 *this->resY); 181 (*weaponWidget)->show(); 182 //printf("update thing %s::%s\n", (*weaponWidget)->getClassName(), (*weaponWidget)->getName()); 178 183 } 179 184 } -
trunk/src/world_entities/elements/glgui_energywidget.cc
r8975 r8976 50 50 void GLGuiEnergyWidget::setValue(float value) 51 51 { 52 MultiType val = value; 52 MultiType val(value); 53 val.setType(MT_INT); 53 54 54 55 this->bar.setValue(value); -
trunk/src/world_entities/weapons/weapon.cc
r8316 r8976 34 34 #include "sound_buffer.h" 35 35 36 #include " glgui_bar.h"36 #include "elements/glgui_energywidget.h" 37 37 38 38 using namespace std; … … 312 312 if (this->energyWidget == NULL) 313 313 { 314 this->energyWidget = new OrxGui::GLGui Bar;314 this->energyWidget = new OrxGui::GLGuiEnergyWidget; 315 315 this->energyWidget->setSize2D( 20, 100); 316 316 this->energyWidget->setMaximum(this->getEnergyMax()); -
trunk/src/world_entities/weapons/weapon.h
r8777 r8976 25 25 class TiXmlElement; 26 26 class FastFactory; 27 namespace OrxGui{ class GLGuiWidget; }28 27 template<class T> class tFastFactory; 29 28 … … 210 209 float maxCharge; //!< The maximal energy to be loaded onto one projectile (this is only availible if chargeable is enabled) 211 210 212 OrxGui::GLGui Bar*energyWidget;211 OrxGui::GLGuiEnergyWidget* energyWidget; 213 212 214 213 PNode* defaultTarget; //!< A target for targeting Weapons.
Note: See TracChangeset
for help on using the changeset viewer.