Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6445 in orxonox.OLD


Ignore:
Timestamp:
Jan 8, 2006, 10:59:21 PM (18 years ago)
Author:
bensch
Message:

trunk: bars are nicer now

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/hud.cc

    r6443 r6445  
    103103  this->weaponManager = weaponMan;
    104104
    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();
    118107}
    119108
     
    136125    {
    137126      weapon->getEnergyWidget()->show();
     127      weapon->getLoadedEnergyWidget()->show();
    138128      this->weaponsWidgets.push_back(weapon->getEnergyWidget());
     129      this->weaponsWidgets.push_back(weapon->getLoadedEnergyWidget());
    139130    }
    140131  }
     
    164155  std::list<GLGuiWidget*>::iterator weaponWidget;
    165156  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)
    167159  {
    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
    170171  }
    171172
  • trunk/src/world_entities/weapons/weapon.cc

    r6444 r6445  
    289289
    290290
    291 GLGuiWidget* Weapon::getMaxEnergyWidget()
     291GLGuiWidget* Weapon::getLoadedEnergyWidget()
    292292{
    293293  if (this->energyLoadedWidget == NULL)
  • trunk/src/world_entities/weapons/weapon.h

    r6439 r6445  
    150150
    151151    GLGuiWidget* getEnergyWidget();
    152     GLGuiWidget* getMaxEnergyWidget();
     152    GLGuiWidget* getLoadedEnergyWidget();
    153153
    154154    // FLOW
Note: See TracChangeset for help on using the changeset viewer.