Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 10, 2015, 7:47:39 PM (10 years ago)
Author:
fvultier
Message:

bug in the WeaponHUD fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/fabienHS15/src/modules/overlays/hud/HUDWeaponMode.cc

    r10791 r10794  
    9393        textOverlayRight_->setZOrder(600);
    9494
    95         materialNameState_ = "Orxonox/WSHUD_Empty";
     95        materialNameState_ = "";
    9696
    9797        overlayElementReplenish_->setMaterialName("Orxonox/WSHUD_Replenish");
     
    198198
    199199        this->owner_ = orxonox_cast<Pawn*>(this->getOwner());
     200
     201        materialNameState_ = ""; // Needed to set the material in the tick ater a change of the owner.
    200202    }
    201203
     
    212214        SUPER(HUDWeaponMode, changedVisibility);
    213215
    214         this->textOverlayLeft_->setVisible(this->isVisible());
    215         this->textOverlayRight_->setVisible(this->isVisible());
     216        bool visible = this->isVisible();
     217
     218        this->textOverlayLeft_->setVisible(visible);
     219        this->textOverlayRight_->setVisible(visible);
     220
     221        if (visible)
     222        {
     223            overlayElementIcon_->show();
     224            overlayElementReplenish_->show();
     225            overlayElementMunition_->show();
     226            overlayElementState_->show();
     227        }
    216228    }
    217229
Note: See TracChangeset for help on using the changeset viewer.