Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11044


Ignore:
Timestamp:
Jan 5, 2016, 9:13:31 AM (8 years ago)
Author:
landauf
Message:

fixed visibility of weapon hud:

  • propagate changedVisibility to all child overlays (necessary if the containing overlaygroup changes its visibility)
  • initialize the visibility of child overlays (necessary if the visibility of the weaponsystem is 'false' in the hud definition)
Location:
code/branches/presentationHS15/src/modules/overlays/hud
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentationHS15/src/modules/overlays/hud/HUDWeapon.cc

    r11026 r11044  
    117117        for (std::vector<WeakPtr<HUDWeaponMode> >::iterator it = hudWeaponModes_.begin(); it != hudWeaponModes_.end(); ++it)
    118118        {
     119            (*it)->changedVisibility(); //inform all Child Overlays that our visibility has changed
    119120            (*it)->setVisible(visible);
    120121        }
     
    168169            hudWeaponMode->setOwner(owner_);
    169170            hudWeaponMode->setOverlayGroup(this->getOverlayGroup());
     171            hudWeaponMode->setVisible(this->isVisible());
    170172            hudWeaponMode->setWeaponMode(it->second);
    171173            hudWeaponMode->setWeaponIndex(this->weaponIndex_);                   
  • code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponMode.cc

    r11026 r11044  
    218218        this->textOverlayLeft_->setVisible(visible);
    219219        this->textOverlayRight_->setVisible(visible);
    220 
    221         if (visible)
    222         {
    223             overlayElementIcon_->show();
    224             overlayElementReplenish_->show();
    225             overlayElementMunition_->show();
    226             overlayElementState_->show();
    227         }
    228220    }
    229221
  • code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponSystem.cc

    r11026 r11044  
    105105        for (std::vector<WeakPtr<HUDWeapon> >::iterator it = hudWeapons_.begin(); it != hudWeapons_.end(); ++it)
    106106        {
     107            (*it)->changedVisibility(); //inform all Child Overlays that our visibility has changed
    107108            (*it)->setVisible(visible);
    108109        }
     
    150151            hudWeapon->setOwner(owner_);
    151152            hudWeapon->setOverlayGroup(this->getOverlayGroup());
     153            hudWeapon->setVisible(this->isVisible());
    152154            hudWeapon->setWeapon(*it);
    153155            hudWeapon->setAspectCorrection(false);
Note: See TracChangeset for help on using the changeset viewer.