- Timestamp:
- Nov 28, 2016, 7:21:35 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/HUD_HS16/src/modules/overlays/hud/HUDPickupItem.cc
r11305 r11314 52 52 overlayElement_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "HUDPickupItem" + getUniqueNumberString())); 53 53 54 overlayElement_->setPosition(0.0f,0.0f); 55 overlayElement_->setDimensions(0.5f,0.5f); 56 this->background_->addChild(overlayElement_); 54 overlayElement_->setDimensions(0.1f,0.1f); 55 57 56 } 58 57 … … 65 64 } 66 65 67 void HUDPickupItem::initializeMaterial(const std::string& s) 68 { 66 void HUDPickupItem::initializeMaterial(const std::string& s, float x, float y) 67 { 68 orxout() << "material name is: " << s << endl; 69 69 overlayElement_->setMaterialName(s); 70 } 71 72 void HUDPickupItem::printHello() 73 { 74 orxout() << "lets say hello" << endl; 70 overlayElement_->setPosition(x, y); 71 overlayElement_->show(); 72 this->background_->addChild(overlayElement_); 73 } 74 75 void HUDPickupItem::hideMe() 76 { 77 orxout() << this << " has called hide" << endl; 78 overlayElement_->hide(); 79 overlayElement_->_update(); 80 orxout() << "after the call the element is visible: " << overlayElement_->isVisible() << endl; 75 81 } 76 82
Note: See TracChangeset
for help on using the changeset viewer.