Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 9, 2009, 2:43:47 PM (15 years ago)
Author:
wirthmi
Message:

Fixed bug: overlays hide when ingame menu is brought up

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc

    r6279 r6289  
    9292            {
    9393                arrowsOverlay1_ = new OrxonoxOverlay(this);
    94                 arrowsOverlay1_->setBackgroundMaterial("Orxonox/CenterOverlay");
     94                arrowsOverlay1_->setBackgroundMaterial("Orxonox/DirectionArrows1");
    9595                arrowsOverlay1_->setSize(Vector2(0.02727, 0.36 * arrowsSize_));
    9696                arrowsOverlay1_->setPickPoint(Vector2(0.5, 0.5));
     
    9999   
    100100                arrowsOverlay2_ = new OrxonoxOverlay(this);
    101                 arrowsOverlay2_->setBackgroundMaterial("Orxonox/CenterOverlay");
     101                arrowsOverlay2_->setBackgroundMaterial("Orxonox/DirectionArrows2");
    102102                arrowsOverlay2_->setSize(Vector2(0.02727, 0.59 * arrowsSize_));
    103103                arrowsOverlay2_->setPickPoint(Vector2(0.5, 0.5));
     
    106106   
    107107                arrowsOverlay3_ = new OrxonoxOverlay(this);
    108                 arrowsOverlay3_->setBackgroundMaterial("Orxonox/CenterOverlay");
     108                arrowsOverlay3_->setBackgroundMaterial("Orxonox/DirectionArrows3");
    109109                arrowsOverlay3_->setSize(Vector2(0.02727, 0.77 * arrowsSize_));
    110110                arrowsOverlay3_->setPickPoint(Vector2(0.5, 0.5));
     
    113113   
    114114                arrowsOverlay4_ = new OrxonoxOverlay(this);
    115                 arrowsOverlay4_->setBackgroundMaterial("Orxonox/CenterOverlay");
     115                arrowsOverlay4_->setBackgroundMaterial("Orxonox/DirectionArrows4");
    116116                arrowsOverlay4_->setSize(Vector2(0.02727, arrowsSize_));
    117117                arrowsOverlay4_->setPickPoint(Vector2(0.5, 0.5));
     
    163163            if( this->controllableEntity_ && !this->controllableEntity_->isInMouseLook() )
    164164            {
    165                 if (this->getControllableEntity() && this->getControllableEntity()->getIdentifier()->getName() == "SpaceShip")
    166                     this->showOverlays();
    167165                this->updateTarget();
     166
    168167                if ( !controlPaused_ ) {
     168                    if (this->getControllableEntity() && this->getControllableEntity()->getIdentifier()->getName() == "SpaceShip")
     169                        this->showOverlays();
     170
    169171                    this->crossHairOverlay_->setPosition(Vector2(static_cast<float>(this->currentYaw_)/2*-1+.5-overlaySize_/2, static_cast<float>(this->currentPitch_)/2*-1+.5-overlaySize_/2));
    170172
    171173                    if ( this->controlMode_ == 0 || ( this->controlMode_ == 1 && this->firemode_ == 1 ) )
    172174                    {
    173                         if ( this->showOverlays_ )
     175                        if ( this->showOverlays_ && this->showArrows_)
    174176                            alignArrows();
    175177                    }
     
    421423    void NewHumanController::doPauseControl() {
    422424        this->controlPaused_ = true;
    423        
     425
    424426        this->hideOverlays();
    425427    }
     
    457459        this->crossHairOverlay_->show();
    458460        this->centerOverlay_->show();
    459        
     461
    460462        if (showArrows_) {
    461463            this->arrowsOverlay1_->show();
     
    469471        this->crossHairOverlay_->hide();
    470472        this->centerOverlay_->hide();
    471        
     473
    472474        this->hideArrows();
    473475    }
Note: See TracChangeset for help on using the changeset viewer.