Changeset 10194 in orxonox.OLD for branches/playability/src/util
- Timestamp:
- Jan 8, 2007, 9:19:39 PM (18 years ago)
- Location:
- branches/playability/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/util/hud.cc
r10139 r10194 65 65 this->subscribeEvent(ES_ALL, SDLK_TAB); 66 66 67 this->shipValuesBox = NULL;67 //this->shipValuesBox = NULL; 68 68 } 69 69 … … 78 78 79 79 delete this->_radar; 80 delete this->shipValuesBox; 80 //if (this->shipValuesBox != NULL) 81 //delete this->shipValuesBox; 81 82 82 83 // delete what has to be deleted here … … 99 100 void Hud::setEnergyWidget(OrxGui::GLGuiWidget* widget) 100 101 { 101 if (this->shipValuesBox == NULL) 102 this->createShipValuesBox(); 102 //if (this->shipValuesBox == NULL) 103 //this->createShipValuesBox(); 104 103 105 // decopple old widget 104 106 if (this->energyWidget != NULL) … … 111 113 { 112 114 //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); 115 117 this->energyWidget->show(); 116 118 /* this->energyWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png"); … … 123 125 void Hud::setShiledWidget(OrxGui::GLGuiWidget* widget) 124 126 { 127 /* 125 128 if (this->shipValuesBox == NULL) 126 129 this->createShipValuesBox(); 130 */ 131 127 132 // decopple old widget 128 133 if (this->shieldWidget != NULL) … … 135 140 { 136 141 //this->shieldWidget->shiftDir2D(270); 137 this->shipValuesBox->pack(this->shieldWidget);142 //this->shipValuesBox->pack(this->shieldWidget); 138 143 this->shieldWidget->show(); 139 144 /* this->shieldWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png"); … … 148 153 void Hud::setArmorWidget(OrxGui::GLGuiWidget* widget) 149 154 { 155 /* 150 156 if (this->shipValuesBox == NULL) 151 157 this->createShipValuesBox(); 158 */ 152 159 153 160 // decopple old widget … … 161 168 { 162 169 //this->armorWidget->shiftDir2D(270); 163 this->shipValuesBox->pack(this->armorWidget);170 //this->shipValuesBox->pack(this->armorWidget); 164 171 this->armorWidget->show(); 165 172 /* this->armorWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png"); … … 277 284 this->_radar->setRange(300); 278 285 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 /* 282 298 if (this->shipValuesBox != NULL) 283 299 { … … 287 303 else 288 304 createShipValuesBox(); 289 305 */ 290 306 291 307 std::list<OrxGui::GLGuiWidget*>::iterator weaponWidget; … … 323 339 } 324 340 341 /* 325 342 void Hud::createShipValuesBox() 326 343 { 327 this->shipValuesBox = new OrxGui::GLGuiBox(OrxGui:: Horizontal);344 this->shipValuesBox = new OrxGui::GLGuiBox(OrxGui::Vertical); 328 345 //this->shipValuesBox->setWidgetSize(1000,500); 329 346 //this->shipValuesBox->setBackgroundTexture("maps/gui_container_background.png"); … … 332 349 this->shipValuesBox->setVisibility(true); 333 350 } 334 335 351 */ 352 353 -
branches/playability/src/util/hud.h
r10139 r10194 59 59 private: 60 60 void updateResolution(); 61 void createShipValuesBox();61 //void createShipValuesBox(); 62 62 63 63 private: … … 68 68 OrxGui::GLGuiWidget* shieldWidget; 69 69 OrxGui::GLGuiWidget* armorWidget; 70 OrxGui::GLGuiBox* shipValuesBox;70 //OrxGui::GLGuiBox* shipValuesBox; 71 71 72 72 OrxGui::GLGuiNotifier* notifier;
Note: See TracChangeset
for help on using the changeset viewer.