Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10194 in orxonox.OLD for branches/playability/src/util


Ignore:
Timestamp:
Jan 8, 2007, 9:19:39 PM (18 years ago)
Author:
muellmic
Message:

implementing interface 'by hand' without still buggy packing-function. can't test with spaceship because of segfault

Location:
branches/playability/src/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/util/hud.cc

    r10139 r10194  
    6565  this->subscribeEvent(ES_ALL, SDLK_TAB);
    6666
    67   this->shipValuesBox = NULL;
     67  //this->shipValuesBox = NULL;
    6868}
    6969
     
    7878
    7979  delete this->_radar;
    80   delete this->shipValuesBox;
     80  //if (this->shipValuesBox != NULL)
     81    //delete this->shipValuesBox;
    8182
    8283  // delete what has to be deleted here
     
    99100void Hud::setEnergyWidget(OrxGui::GLGuiWidget* widget)
    100101{
    101   if (this->shipValuesBox == NULL)
    102     this->createShipValuesBox();
     102  //if (this->shipValuesBox == NULL)
     103    //this->createShipValuesBox();
     104
    103105  // decopple old widget
    104106  if (this->energyWidget != NULL)
     
    111113  {
    112114    //this->energyWidget->shiftDir2D(270);
    113     dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (this->energyWidget)->setDisplayedName("Electronics");
    114     this->shipValuesBox->pack(this->energyWidget);
     115    //dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (this->energyWidget)->setDisplayedName("Electronics");
     116    //this->shipValuesBox->pack(this->energyWidget);
    115117    this->energyWidget->show();
    116118    /*    this->energyWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png");
     
    123125void Hud::setShiledWidget(OrxGui::GLGuiWidget* widget)
    124126{
     127  /*
    125128  if (this->shipValuesBox == NULL)
    126129    this->createShipValuesBox();
     130  */
     131
    127132  // decopple old widget
    128133  if (this->shieldWidget != NULL)
     
    135140  {
    136141    //this->shieldWidget->shiftDir2D(270);
    137     this->shipValuesBox->pack(this->shieldWidget);
     142    //this->shipValuesBox->pack(this->shieldWidget);
    138143    this->shieldWidget->show();
    139144    /*    this->shieldWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png");
     
    148153void Hud::setArmorWidget(OrxGui::GLGuiWidget* widget)
    149154{
     155  /*
    150156  if (this->shipValuesBox == NULL)
    151157    this->createShipValuesBox();
     158  */
    152159
    153160// decopple old widget
     
    161168  {
    162169    //this->armorWidget->shiftDir2D(270);
    163     this->shipValuesBox->pack(this->armorWidget);
     170    //this->shipValuesBox->pack(this->armorWidget);
    164171    this->armorWidget->show();
    165172    /*    this->armorWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png");
     
    277284    this->_radar->setRange(300);
    278285    this->_radar->show();
    279   }
    280 
    281  
     286
     287    if (this->armorWidget != NULL)
     288      this->armorWidget->setRelCoor2D(0.1*this->resX, this->armorWidget->getSizeX2D());
     289    if (this->shieldWidget != NULL)
     290      this->shieldWidget->setRelCoor2D(0.1*this->resX + this->armorWidget->getSizeY2D(), this->armorWidget->getSizeX2D());
     291    if (this->energyWidget != NULL)
     292      this->energyWidget->setRelCoor2D(0.1*this->resX + this->armorWidget->getSizeY2D() + this->shieldWidget->getSizeY2D(), this->armorWidget->getSizeX2D());
     293    //this->shieldWidget->setRelCoor2D(0.1*this->resX + this->armorWidget->getSizeX2D(),0);
     294    //this->energyWidget->setRelCoor2D(0.1*this->resX + this->armorWidget->getSizeX2D() + this->shieldWidget->getSizeX2D(),0);
     295  }
     296
     297  /*
    282298  if (this->shipValuesBox != NULL)
    283299  {
     
    287303  else
    288304    createShipValuesBox();
    289 
     305  */
    290306
    291307  std::list<OrxGui::GLGuiWidget*>::iterator weaponWidget;
     
    323339}
    324340
     341/*
    325342void Hud::createShipValuesBox()
    326343{
    327   this->shipValuesBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
     344  this->shipValuesBox = new OrxGui::GLGuiBox(OrxGui::Vertical);
    328345  //this->shipValuesBox->setWidgetSize(1000,500);
    329346  //this->shipValuesBox->setBackgroundTexture("maps/gui_container_background.png");
     
    332349  this->shipValuesBox->setVisibility(true);
    333350}
    334 
    335 
     351*/
     352
     353
  • branches/playability/src/util/hud.h

    r10139 r10194  
    5959  private:
    6060    void updateResolution();
    61     void createShipValuesBox();
     61    //void createShipValuesBox();
    6262
    6363private:
     
    6868  OrxGui::GLGuiWidget*     shieldWidget;
    6969  OrxGui::GLGuiWidget*     armorWidget;
    70   OrxGui::GLGuiBox*        shipValuesBox;
     70  //OrxGui::GLGuiBox*        shipValuesBox;
    7171
    7272  OrxGui::GLGuiNotifier*   notifier;
Note: See TracChangeset for help on using the changeset viewer.