Changeset 10233 in orxonox.OLD for branches/playability/src
- Timestamp:
- Jan 11, 2007, 11:42:43 PM (18 years ago)
- Location:
- branches/playability/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/util/hud.cc
r10230 r10233 57 57 this->resY = 1; 58 58 59 this->travelZoneWidth = 0.7; 59 this->overlayPercentage = 5; 60 this->overlayActive = false; 61 this->rightRect = NULL; 62 this->leftRect = NULL; 60 63 61 64 this->inputLine = new OrxGui::GLGuiInputLine(); … … 83 86 84 87 delete this->_radar; 88 delete this->rightRect; 89 delete this->leftRect; 85 90 //if (this->shipValuesBox != NULL) 86 91 //delete this->shipValuesBox; … … 286 291 this->notifier->setWidgetSize(0.25 * this->resX, 0.6 * this->resY); 287 292 293 if (this->overlayActive == true) 294 { 295 if (this->rightRect == NULL) 296 this->rightRect = new OrxGui::GLGuiWidget(); 297 //if (this->leftRect == NULL) 298 //this->leftRect = new OrxGui::GLGuiWidget(); 299 300 int overlayWidth = this->resX * (100-overlayPercentage)/(200); 301 this->rightRect->hide(); 302 /* 303 this->leftRect->setWidgetSize(float(overlayWidth), float(this->resY)); 304 this->leftRect->setAbsCoor2D(0,0); 305 this->leftRect->setBackgroundTexture(Texture()); 306 this->leftRect->setBackgroundColor(Color(0,0,0.7,0.2)); 307 this->leftRect->show(); 308 */ 309 310 311 this->rightRect->setParent2D(this); 312 this->rightRect->setWidgetSize(float(overlayWidth), float(this->resY)); 313 this->rightRect->setAbsCoor2D(this->resX - overlayWidth,this->resY); 314 this->rightRect->setBackgroundTexture(Texture()); 315 this->rightRect->setBackgroundColor(Color(0,0,0.7,0.2)); 316 //this->rightRect->setForegroundTexture(Texture()); 317 //this->rightRect->setForegroundColor(Color(1,1,1,1)); 318 this->rightRect->show(); 319 320 } 321 288 322 289 323 if (State::getPlayer() && State::getPlayer()->getPlayable() && State::getObjectManager()) … … 349 383 } 350 384 351 //if (this->rightRect == NULL)352 353 385 } 354 386 -
branches/playability/src/util/hud.h
r10230 r10233 54 54 void updateWeaponManager(); 55 55 56 inline void set TravelZoneWidth(float width)56 inline void setOverlayPercentage(int perc) 57 57 { 58 if ( width > 1) width = 1;59 else if ( width < 0) width= 0;58 if (perc > 100) perc = 100; 59 else if (perc < 0) perc = 0; 60 60 61 this->travelZoneWidth = width; 61 this->overlayPercentage = perc; 62 updateResolution(); 63 }; 64 65 inline void setOverlayActive(bool b) 66 { 67 overlayActive = b; 68 updateResolution(); 62 69 }; 63 70 … … 84 91 OrxGui::GLGuiRadar* _radar; 85 92 86 OrxGui::GLGuiWidget* rightRect, leftRect; 93 OrxGui::GLGuiWidget* rightRect; 94 OrxGui::GLGuiWidget* leftRect; 95 bool overlayActive; 96 int overlayPercentage; //the percentage of the screen, the player has got for his movements. should always be a value between 0 and 1; 87 97 88 98 WeaponManager* weaponManager; -
branches/playability/src/world_entities/elements/glgui_energywidgetvertical.cc
r10230 r10233 54 54 this->_bar.setValue(value); 55 55 this->_bar.setForegroundColor(Color::slerpHSVColor(Color::red, Color::green, value/this->_bar.maximum())); 56 this->_bar.setFrontColor(Color(1,1,1,1), true);56 //this->_bar.setFrontColor(Color(1,1,1,1), true); 57 57 this->_valueText.setText(val.getString()); 58 58 //this->_valueText.setText("asdfas"); -
branches/playability/src/world_entities/space_ships/space_ship.cc
r10230 r10233 424 424 this->secWeaponMan.showCrosshair(); 425 425 this->toList( OM_GROUP_01 ); 426 State::getPlayer()->hud().setOverlayActive(true); 426 427 //dynamic_cast <OrxGui::GLGuiEnergyWidgetVertical*> (State::getPlayer()->hud().getArmorWidget())->setDisplayedName("Armor"); 427 428 //dynamic_cast<Element2D*>(this->secWeaponMan.getFixedTarget())->setVisibility( true); … … 434 435 this->secWeaponMan.hideCrosshair(); 435 436 this->toList( OM_GROUP_00); 437 State::getPlayer()->hud().setOverlayActive(false); 436 438 //dynamic_cast<Element2D*>(this->secWeaponMan.getFixedTarget())->setVisibility( false); 437 439 //this->detachCamera();
Note: See TracChangeset
for help on using the changeset viewer.