Changeset 10120 in orxonox.OLD for branches/playability/src/util
- Timestamp:
- Dec 20, 2006, 12:02:01 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/util/hud.cc
r10111 r10120 24 24 #include "glgui_widget.h" 25 25 #include "glgui_box.h" 26 #include "elements/glgui_energywidgetvertical.h" 26 27 27 28 #include "glgui_inputline.h" … … 108 109 this->energyWidget->show(); 109 110 this->energyWidget->shiftDir2D(270); 110 //this->energyWidget->setDisplayedName("Electronics")111 dynamic_cast<OrxGui::GLGuiEnergyWidgetVertical*> (this->energyWidget)->setDisplayedName("Electronics"); 111 112 this->shipValuesBox->pack(this->energyWidget); 112 113 /* this->energyWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png"); … … 118 119 119 120 void Hud::setShiledWidget(OrxGui::GLGuiWidget* widget) 120 {} 121 { 122 // decopple old widget 123 if (this->shieldWidget != NULL) 124 { 125 this->shieldWidget->hide(); 126 } 127 128 this->shieldWidget = widget; 129 if (this->shieldWidget != NULL) 130 { 131 this->shieldWidget->show(); 132 this->shieldWidget->shiftDir2D(270); 133 this->shipValuesBox->pack(this->shieldWidget); 134 /* this->shieldWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png"); 135 this->shieldWidget->frontMaterial().setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);*/ 136 } 137 138 this->updateResolution(); 139 } 121 140 122 141 void Hud::setArmorWidget(OrxGui::GLGuiWidget* widget) 123 {} 142 { 143 // decopple old widget 144 if (this->armorWidget != NULL) 145 { 146 this->armorWidget->hide(); 147 } 148 149 this->armorWidget = widget; 150 if (this->armorWidget != NULL) 151 { 152 this->armorWidget->show(); 153 this->armorWidget->shiftDir2D(270); 154 //this->shipValuesBox->pack(this->armorWidget); 155 /* this->armorWidget->frontMaterial().setDiffuseMap("hud_energy_bar.png"); 156 this->armorWidget->frontMaterial().setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);*/ 157 } 158 159 this->updateResolution(); 160 } 124 161 125 162 void Hud::setWeaponManager(WeaponManager* weaponMan, WeaponManager* weaponManSec) … … 235 272 if (this->shipValuesBox != NULL) 236 273 { 237 this->shipValuesBox->setAbsCoor2D(0. 2* this->resX, 0.85 * this->resY);274 this->shipValuesBox->setAbsCoor2D(0.8 * this->resX, 0.85 * this->resY); 238 275 this->shipValuesBox->setWidgetSize(.4 * this->resX, 0.1 * this->resY); 239 276 }
Note: See TracChangeset
for help on using the changeset viewer.