Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10760 in orxonox.OLD for branches


Ignore:
Timestamp:
Jun 21, 2007, 2:29:46 AM (17 years ago)
Author:
nicolasc
Message:

Widget Improvements

Location:
branches/presentation/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/lib/graphics/importer/static_model.cc

    r10758 r10760  
    103103  // go through all groups and check if they are mounts
    104104  std::vector<StaticModelData::Group>::iterator groupIt = this->data->getGroups().begin();
    105   for( ; groupIt != this->data->getGroups().end(); groupIt++)
     105  for( ; groupIt != this->data->getGroups().end();)
    106106  {
    107107    //PRINTF(0)("Found a MountPoint: %s\n", groupName.c_str());
     
    113113    // check if the name has a "MP" prefix or else it won't work
    114114    if( groupName.find("MP.", 0) == std::string::npos){
     115      groupIt++;
    115116      continue;
    116117    }
     
    125126      PRINTF(4)("the face count of %s is wrong, perhaps you missnamed this object or used the wrong mount point object (got %i faces)\n",
    126127                groupName.c_str(), (*groupIt)._faces.size());
     128      groupIt++;
    127129      continue;
    128130    }
     
    211213//     printf("adding MP\n");
    212214     this->addMountPoint( zAxis, yAxis, center, groupName);
    213 
     215      // remove the group from the model list (mount points do not need to be drawn)
     216//      std::vector<StaticModelData::Group>::iterator tmpIt =  groupIt;
     217     groupIt++;
     218//      this->data->getGroups().erase(tmpIt);
    214219  }
    215220}
  • branches/presentation/src/world_entities/projectiles/hbolt.cc

    r10758 r10760  
    182182//     float matrix[4][4];
    183183    glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
     184    glPushAttrib(GL_ENABLE_BIT);
     185    glEnable( GL_ALPHA_TEST);
     186    glAlphaFunc( GL_GEQUAL, .5);
    184187    this->halo->draw();
     188    glPopAttrib();
    185189
    186190    Vector tmpRot = this->getAbsDir().getSpacialAxis();
  • branches/presentation/src/world_entities/space_ships/space_ship.cc

    r10758 r10760  
    305305
    306306
    307   dynamic_cast<WorldEntity*>(this)->createHealthWidget();
    308   dynamic_cast<WorldEntity*>(this)->createShieldWidget();
    309   dynamic_cast<WorldEntity*>(this)->createElectronicWidget();
     307  this->createHealthWidget();
     308  this->createShieldWidget();
     309  this->createElectronicWidget();
    310310
    311311  if ( this->hasPlayer() ){
     
    428428void SpaceShip::tick (float time)
    429429{
    430  
    431   printf("Ship Status: %f, %f\n", this->getHealth(), this->getShield());
    432  
     430
    433431  if(caminit)
    434432  {
     
    10841082void SpaceShip::hit( float damage, WorldEntity * killer )
    10851083{
    1086   printf("SS HIT: %f, %f \n", this->getHealth() , this->getShield());
     1084  PRINTF(4)("SS HIT: %f, %f \n", this->getHealth(), this->getShield());
    10871085  Playable::hit( damage, killer );
    1088   PRINTF(4)("SS HIT: %f\n", this->getHealth());
     1086  PRINTF(4)("SS HIT: %f, %f \n", this->getHealth(), this->getShield());
    10891087}
    10901088
  • branches/presentation/src/world_entities/world_entity.cc

    r10758 r10760  
    272272    {
    273273      PRINTF(4)("fetching OBJ file: %s\n", fileName.c_str());
    274       // creating the model and loading it
     274      // creating the model and loading it  OrxGui::GLGuiEnergyWidgetVertical* implantWidget;
    275275      StaticModel* model = new StaticModel();
    276276      *model = ResourceOBJ(fileName, this->scaling);
     
    831831    float retShield = this->shieldMax - this->shield;
    832832    this->shield = this->shieldMax;
    833 //     this->updateShieldWidget();
     833    this->updateShieldWidget();
    834834    return retShield;
    835835  }
    836 //   this->updateShieldWidget();
     836  this->updateShieldWidget();
    837837  return 0.0;
    838838}
     
    849849  {
    850850    float retShield = -this->shield;
    851 //     this->updateShieldWidget();
     851    this->updateShieldWidget();
    852852    this->bShieldActive = false;
    853853    return retShield;
    854854  }
    855 //   this->updateShieldWidget();
     855  this->updateShieldWidget();
    856856  return 0.0;
    857857}
     
    944944OrxGui::GLGuiWidget* WorldEntity::getImplantWidget()
    945945{
    946   this->createImplantWidget();
     946  if(this->implantWidget == NULL)
     947    this->createImplantWidget();
    947948  return this->implantWidget;
    948949}
     
    10831084    this->shieldWidget = new OrxGui::GLGuiEnergyWidgetVertical();
    10841085    this->shieldWidget->getBarWidget()->setChangedValueColor(Color(1,0,0,1));
    1085     //this->shieldWidget->setDisplayedName("Shield:");
    1086     //his->shieldWidget->setSize2D(100,20);
    1087     //this->shieldWidget->setAbsCoor2D(200,200);
     1086//     this->shieldWidget->setDisplayedName("Shield:");
     1087//     his->shieldWidget->setSize2D(100,20);
     1088//     this->shieldWidget->setAbsCoor2D(200,200);
    10881089    this->updateShieldWidget();
    10891090//     if (dynamic_cast<SpaceShip*>(this)->hasPlayer())
  • branches/presentation/src/world_entities/world_entity.h

    r10737 r10760  
    272272  float                   healthRegen;            //!< Regeneration Rate of Health, mesured in units per second
    273273  OrxGui::GLGuiEnergyWidgetVertical* healthWidget;    //!< The Slider (if wanted).
     274
    274275  OrxGui::GLGuiEnergyWidgetVertical* implantWidget;
    275276
Note: See TracChangeset for help on using the changeset viewer.