- Timestamp:
- Nov 7, 2016, 5:08:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/HUD_HS16/src/modules/overlays/hud/HUDPickupItem.cc
r11264 r11277 29 29 #include "HUDPickupItem.h" 30 30 31 #include <string> 32 33 34 #include <OgreOverlayManager.h> 35 #include <OgrePanelOverlayElement.h> 36 31 37 #include "core/CoreIncludes.h" 32 38 #include "core/XMLPort.h" 33 39 #include "util/Convert.h" 34 40 #include "core/class/Super.h" 41 #include "HUDPickupItem.h" 35 42 36 43 namespace orxonox 37 44 { 38 45 RegisterClass(HUDPickupItem); 46 Ogre::PanelOverlayElement* overlayElement_; 39 47 40 48 HUDPickupItem::HUDPickupItem(Context* context) : OrxonoxOverlay(context) … … 43 51 44 52 overlayElement_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "HUDPickupItem" + getUniqueNumberString())); 45 overlayElement_->setMaterialName("Orxonox/WSHUD_Weapon"); //TODO be switched53 46 54 overlayElement_->setPosition(0.0f,0.0f); 47 overlayElement_->setDimensions( 1.0f,1.0f);55 overlayElement_->setDimensions(0.5f,0.5f); 48 56 this->background_->addChild(overlayElement_); 49 57 } … … 53 61 if (this->isInitialized()) 54 62 { 55 destroyHUDChilds();63 overlayElement_=nullptr; 56 64 } 65 } 66 67 void initializeMaterial(std::string s) 68 { 69 overlayElement_->setMaterialName(s); 57 70 } 58 71
Note: See TracChangeset
for help on using the changeset viewer.